ORBIT-USER: Threads and measurements

Max Ott max at semandex.net
Mon Jul 24 20:19:31 EDT 2006


Daryl,

I'm not completely sure what your experiment is doing, but I hope you
are aware that if your main thread reaches 'Experiment.done', the
experiment finishes, independent on how far along you are in the tread
you created.

If you want to wait for the thread to finish, you have to call a
'join' on the thread before the Experiment.done statement.

You also have to be aware that any exceptions caused in the thread
will kill the thread without any traces in the log.

I would also highly encourage you to use the 'debug', 'info', 'warn',
'error' functions instead of 'puts'. This will add your comments on
the command line as well the log (together with timestamps) and it
will give you more control over what goes what. You may not see the
benfit at this stage, but it is a good habit to get into.

There is most likely a cleaner way to do what you want to do without
having to resort to threads, but I need to think about that a bit
more.

-max

-- 
Dr. Max Ott
Research Program Leader - Network and Pervasive Computing, NICTA Australia
Founder & CTO, Semandex Networks
Research Professor, WINLAB, Rutgers University



More information about the orbit-user mailing list