Do you know where your variables are? | |
PerlMonks |
Re^4: Win32::GUI window freezing, even with threading. (Wrong solution)by BrowserUk (Patriarch) |
on May 28, 2013 at 09:07 UTC ( [id://1035552]=note: print w/replies, xml ) | Need Help?? |
How to fix that? Don't use yield:
That effectively equates to sleep( 0 ), which whilst it ensures that other threads get a timeslice, equates to:
when there are no other threads available to run; which is a cpu costly way to implement a delay. Replace it with Win32::Sleep( 33 ) will ensure that the gui remains responsive at speed faster than the eye can detect, but will drop the cpu usage of that thread to near 0. Which translates into what linechanges in OPs code? Should be as simple as:
Though that is untested. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|