I would like to know if i can pass the object of scrolled widget or as a matter any hash reference to another thread in perl 5.10?
No. TK isn't thread-safe. Any attempt to call methods on an object handle from thread other than the one in which it was created will fail. Sometimes the failure will be a hard failure--trap or segfault. Sometimes it will be less immediately demonstrative, but it will cause problems. Often of a mysterious and difficult to track nature.
Rather than have this event thread update the gui directly, the correct way to do this is to pass a message from the event thread to teh gui thread and make all updates to the gui from the gui thread.
In reply to Re: How to pass scrolled object to another thread
by BrowserUk
in thread How to pass scrolled object to another thread
by himanshujain_60
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |