At 03:08 PM 7/24/02 +0100, Ray Hilton wrote:
>Hmm, ok, well it seems it comes back to the fact that perl does not wait
>for threads to finish, so its more than likely the main process is
>finishing before the threads have even begun to do anything.

Indeed.

If you don't detach you threads, you can do the following at the end of 
your program:

   $_->join foreach threads->list;

This waits for _any_ undetached threads to be finished.  It sort of gives 
you the "wait_on_exit" functionality that Arthur described.  But this only 
works if you don't detach your threads...


Liz

Reply via email to