[Bf-committers] Pretty clueless Linux threads crashing...
Kenneth Styrberg
kenneth.styrberg at telia.com
Fri Feb 24 21:25:28 CET 2006
Stephane SOPPERA wrote:
> On 2/24/06, *Kenneth Styrberg* <kenneth.styrberg at telia.com
> <mailto: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
>
Hmm, yes I was thinking of a detatched thread, but SDL don't support
that. (As far as I could see)
//styken
More information about the Bf-committers
mailing list