I think you really need to do a $thread->join at the end of your subroutine.
But instead of polling, I would have the thread send a (Windows) message to the main thread to tell the main thread/window that it can now fetch the data and update things.
In reply to Re^3: threads causing memory leak
by Corion
in thread threads causing memory leak
by holli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |