On Sep 17, 2008, at 5:04 AM, Antonio wrote:

> Hi All,
> I'm working on TOSThreads but I have a problem.
> My question is very simple:
>
> Is it possible to wait for the end of a Thread in TinyOS?
> I mean, when I do "call Thread.start(NULL);" I know I'm calling the
> Thread.run() method. The caller execution goes on. If the caller  
> wants to
> know if the Thread.run() is ended, what can be done?
>

It sounds like we need a Thread.join()...

One way to do this is with a condition variable. I.e., the new thread  
sets a variable to 1 just before it exits and signals a condition;  
the waiting thread is waiting on the condition variable, checking if  
the variable is 1.

Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to