SDL Digest, Vol 18, Issue 8

This arbitrary artificial delay strikes me as a makeshift hack to get
things to work and not the “right” way to do things. Isn’t there some
sort of AssertThreadIsFullyCreated() function? I always feel uneasy
when doing hacks like that.

-Trevor Agnitti
www.lackeyccg.comOn Jun 4, 2008, at 9:58 PM, sdl-request at lists.libsdl.org wrote:

I am making sure that the threads are created
fully before broadcasting by adding a temporary artificial delay of
1-2s
before the broadcast.

Why not just have the main process wait on a condition variable that the threads set when their initialization is complete?> ----- Original Message -----

From: trevor@lackeyccg.com (Trevor Agnitti)
To: sdl at lists.libsdl.org
Sent: Wednesday, June 4, 2008 7:20:47 PM
Subject: Re: [SDL] SDL Digest, Vol 18, Issue 8

This arbitrary artificial delay strikes me as a makeshift hack to get
things to work and not the “right” way to do things. Isn’t there some
sort of AssertThreadIsFullyCreated() function? I always feel uneasy
when doing hacks like that.