[Bf-committers] Pretty clueless Linux threads crashing...

Stephane SOPPERA stephane.soppera at gmail.com
Fri Feb 24 08:17:28 CET 2006


On 2/24/06, Kenneth Styrberg <kenneth.styrberg at telia.com> wrote:
>
> I did a quick check and the call to SDL_WaitThread() in
> BLI_remove_thread(...), seems unneccesary as you check that the render
> is complete with the ready flag, and at that point the thread already
> exited the function! So no need to wait, it's already gone!
> I tried to comment it out and it worked ok.
>
> The function BLI_end_threads(...) does a call to SDL_WaitThread() but
> that seems to be some garbage collection as that call never should be
> made, unless a thread was orphened somehow?!
>
> I don't know if this helps at all but I did some tests anyway...
>
> Btw on windows 2000 and MSVC 6
>

On Unix systems using pthread for threading, a thread has to be "joined" at
its end. That's what SDL_WaitThread does. If you don't join it, it is kepts
as a ghost until the end of the program.
So it's normal to have a SDL_WaitThread even if the thread function has
exited.

On Windows, I don't think there is this concept of joining but I haven't
used thread for quite some time now.

Stephane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.blender.org/pipermail/bf-committers/attachments/20060224/6f5c1351/attachment.html


More information about the Bf-committers mailing list