in reply to Thread problems
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Thread problems
by Dirk80 (Pilgrim) on Dec 04, 2009 at 17:03 UTC | |
Hi, Thank you for the hint with the example of zentara. And thank you for the advice to use Gtk. I like Tk very much and yesterday arrived the book "Mastering Perl/Tk". So I'd like to stay with Tk at the moment. I nearly finished an application with Tk now and I only need this small thread thing to complete. Now I could create a solution. Here is the code what is doing what I want.
Hopefully you monks can tell me how to improve this code. Using goto is bad and waiting for an event in a loop is also not the best style and costs a lot of performance. But I don't know how to solve it in a different way. Greetings Dirk | [reply] [d/l] |
by zentara (Cardinal) on Dec 04, 2009 at 18:29 UTC | |
... see TGI's reply in Reusable threads demo ..... he gives a little tutorial on how to fix the goto's and make sweeter code...... me.....it's Friday afternoon man.. !! ;-) | [reply] |
by Dirk80 (Pilgrim) on Dec 11, 2009 at 15:55 UTC | |
Hi, I like the following solution of my problem, although it contains some gotos. But the states in the thread make clear what the expected behaviour should be. It has handshakes and now the code is working exactly as I want.
Greetings Dirk | [reply] [d/l] |
by zentara (Cardinal) on Dec 11, 2009 at 16:10 UTC | |
by Dirk80 (Pilgrim) on Dec 13, 2009 at 18:55 UTC | |