Re: [AD] 4.9/src/win/wxthread.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
On 2009-03-14, AJ <aj@xxxxxxxxxx> wrote:
i see threading issues...
_beginThread() 's  return value can be wrong for short lived threads

Thanks for pointing it out.

the return value is stored in the thread->thread member
the trampoline should call thread->thread = GetCurrentThread(); to ensure it gets a valid handle, as the handle _has_to exist at the time of the GetCurrentThread() call.

That introduces another (probably more likely) problem.
_al_thread_create() returns, then it's quite possible that the user then
calls another function which accesses `thread->thread' *before*
thread_proc_trampoline() has filled it in.  So more synchronisation is
needed.

Anyone willing to fix this?  Otherwise into the bug tracker it goes...


i'll look into it over the next 24hrs... as it potential effects my work, i'm interested in having it resolved.





Peter


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/