Hello monks!
Earlier this summer, I wrote a script to prepare large data files for some bioinformatics analysis. Since the number of options and input files to be specified by the user grew with the project, I decided to make a GUI using Tk. The GUI allows the user to specify the different input files and options, and then to launch the computation that the script was meant to do in the first place.
The problem is that, when the computation is launched, the interface freezes in the most inelegant way. And any progress message sent to the GUI is not shown until the computation is over (that makes for very useless progress messages!).
I've read that this freezing of the GUI is a common problem and the solution that is often proposed is to use parallel programming. I tried it briefly by replacing
&Launch_computation();by
my $t1 = Thread -> new(\&Launch_computation()); $t1 -> detach();
On the surface, the problem was solved (the GUI was not jammed and progress messages were delivered timely). But I also faced new error messages that contains no reference to my code, like
Attempt to free non-existent shared string '_TK_RESULT_', Perl interpreter: 0x207ab410 at /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi/Tk.pm line 250.I am aware of the dangers and problems of parallel programming and I don't feel that I know perl well enough to do it... especially to do it well and safely. So I was wondering if you monks know of a way to free the Tk MainLoop without getting into parallel programming.
Thank you very much for your help!In reply to Is there a way to free the Tk MainLoop without getting into parallel programming? by Takuan Soho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |