Sdl and pthread

I have prolem with sdl and pthread .

My sdl program run in a pthread thread. When i try to
cancel this thread (with pthread_cancel function) i have
a segfault message or SDL Parachute Seg fault …

can youhelp me

thanks.

I have prolem with sdl and pthread .

My sdl program run in a pthread thread. When i try to
cancel this thread (with pthread_cancel function) i have
a segfault message or SDL Parachute Seg fault …

can youhelp me

Hmm, i’m no expert on this, but to get around that, just don’t cancec
the thread. Work around it by supplying a mutex-protexted flag, which
signals the thread to exit gracefully. The event loop in the sdl-thread
should then check this flag once in a while :slight_smile: and do cleanup and
things.

I don’t know how thread canceling is implemented, but maybe it just
shoots of the thread in an ad hoc way.On Thu, 28 Nov 2002 11:39:18 +0100 olnet at free.fr wrote:


@Florian_Schmidt
http://mistatapas.ath.cx
http://www.arted.biz/mista.tapas