Any way to block a thread until another has started?
Posted: Sun Feb 06, 2011 11:16 am
My main thread sets up some other threads (starts them), and then needs to send them messages. The problem is, it tries to send the message too soon, and the threads haven't yet started.
Is it possible for a thread to block on a message send to a thread that hasn't started yet? Right now, I only know how to get the current thread,which means I don't even know the thread until it has entered its entry point, at which point i call chThdSelf() and store the result.
Is there a way to get the Thread* object from a thread's working area, and send it a message after having called chThdCreateStatic, but perhaps before the thread has begun executing, and just have that call block until the thread starts up and can receive the message?
TIA!
Is it possible for a thread to block on a message send to a thread that hasn't started yet? Right now, I only know how to get the current thread,which means I don't even know the thread until it has entered its entry point, at which point i call chThdSelf() and store the result.
Is there a way to get the Thread* object from a thread's working area, and send it a message after having called chThdCreateStatic, but perhaps before the thread has begun executing, and just have that call block until the thread starts up and can receive the message?
TIA!