The problem is that you should never write something to block inside
hte body of a timer event.  This will cause the TinyOS thread to block
and ultimately break the system.  What you want to do is start an
initilization thread that then starts another thread and waits for it
to complete on a condition variable.  DOn't use the condition variable
directly inside the timer event or your whole program will freeze.

Kevin

On Wed, Sep 17, 2008 at 9:18 AM, Philip Levis <[EMAIL PROTECTED]> wrote:
>
> On Sep 17, 2008, at 8:05 AM, Antonio wrote:
>
>> Yes, I need a Thread.join()!!!
>> I tried your solution, but it doesn't works.
>> In my application I have a Timer. When it fires I start a Thread and
>> in the
>> same Timer.fired() event I wait for the end of the Thread.
>> Maybe is it impossible to do?
>
> Did you use a condition variable? See the interface ConditionVariable.
>
> Phil
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



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

Reply via email to