Signaling a thread to quit

Hi, in my program, i have a thread that waits on SDL sockets.
I want to signal this thread to quit, but having a global
variable that indicates by its value when the thread should
quit wouldnt work well since SDLNet_CheckSockets only
returns control to the thread when theres socket activity.
I guess I could limit CheckSockets to like 1 second so that
the thread could check the global variable at leaste that often,
but that doesnt sound like an optimal way to do this. Is there
any better way?

I know if I was using pthreads and real berkley sockets I could
just send a signal to the thread, but that’s not very portable.

Thanks

btw: I never used newsgroups before so sorry if this gets
posted in someone elses thread or something.