Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Is CC crash, or Debugger plugin?

<< < (22/23) > >>

oBFusCATed:
BTW there is another problem in this function:

This fragment should be inside the lock, too:

--- Code: --- // get the matching set
TokenIdxSet result;
m_NativeParser.MarkItemsByAI(result, true, false, true, endPos);

--- End code ---

Example:

--- Code: ---array_of_pointers;
{
    lock;
    collect_some(array_of_pointers);
}

{
   lock
   use(array_of_pointer);
}

--- End code ---
This code is broken because between the two locks another thread can acquire the lock and delete some of the objects pointed in the array.

ollydbg:
I don't like such lockers, as it make the code too broken to read and maintain. So, I always avoid to discuss how to place lockers, as I think all of them should be removed. :D

oBFusCATed:
And how do you make threaded programs correct without lockers?
As far as I know there is no known way to achieve this in an imperative programming language.

ollydbg:

--- Quote from: oBFusCATed on September 14, 2011, 09:56:44 am ---And how do you make threaded programs correct without lockers?

--- End quote ---
I suggest do not generate "suggestion list" when parserthread is running. This can avoid a lot of lockers in CC's code.

oBFusCATed:
How would you know if the thread is not running?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version