SyN/AcK has asked for the wisdom of the Perl Monks concerning the following question:
Hello fellow Monks!
So, I'm having this problem when working with threading. I'm hoping someone can help me resolve it. So, what I have is a GUI written in Visual Perl .NET that based on some user input runs a particular set of operations. These operations take a large chunk of time to complete, and they appear to be causing my GUI to freeze.
So, what I was thinking I would do is make a seperate thread for the actions that take place, hoping that this would keep the GUI from freezing. The problem here is, the actions need to communicate their results back to the GUI. Unfortunately, when I try to output to the GUI, it will not allow me to. It simply doesn't show anything, there's no errors, it just doesn't show anything.
I've tried several different threading methods, including those from .NET, as well as perl's threads. Basically I'm creating a thread that is associated with a function (or subroutine), and I'm hoping that when I click go on my GUI, that control will be passed to the thread, or the function (which it is), but I still need that thread to be able to communicate its results to the GUI.
Is there a better way to do this? What am I missing? Sorry, I'm a bit clueless when it comes to threads.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Threading in Perl
by Cine (Friar) on Jul 29, 2003 at 22:26 UTC | |
by bobn (Chaplain) on Jul 29, 2003 at 22:37 UTC | |
by Cine (Friar) on Jul 29, 2003 at 22:38 UTC | |
by bobn (Chaplain) on Jul 29, 2003 at 23:38 UTC | |
|
Re: Threading in Perl
by BrowserUk (Patriarch) on Jul 29, 2003 at 22:49 UTC | |
|
Re: Threading in Perl
by SyN/AcK (Scribe) on Jul 30, 2003 at 02:55 UTC | |
by castaway (Parson) on Jul 30, 2003 at 07:20 UTC | |
by SyN/AcK (Scribe) on Jul 30, 2003 at 07:39 UTC |