You say "the code is called every 30 seconds" - do you mean you create a new thread every 30 seconds? Do you ever ->join that thread? Otherwise, I think you should use async. Personally, I would put the fetched results in a Thread::Queue and retrieve it from there in the main thread, so that all updating of new data happens within the main thread and only the fetching happens asynchronously, using ->dequeue_nb().
As Win32::GUI is event-driven, it might even make sense to have the worker thread send a window message to the main program to tell it to fetch the result.
In reply to Re: threads causing memory leak
by Corion
in thread threads causing memory leak
by holli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |