in reply to Re^8: Threads sharing global variable
in thread Threads sharing global variable
BrowserUk runs windows
Did he run ikegami's code?
Changing cond_signal to cond_broadcast changes nothing
Yeah, I didn't expect it would. The point is, as far as I can see, the code is race-free and it can not deadlock. Can you please explain, how exactly does it hang? Can you debug it? Can you detail the scenario that leads to deadlock? Describe the state of the program where and as it hangs?
Another thought: maybe try eliminate the use of Thread::Queue. Just keep $prev in printer, count number of $changes and if ($changes >= 100) terminate "with Success".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Threads sharing global variable
by BrowserUk (Patriarch) on Mar 06, 2016 at 14:40 UTC | |
by Anonymous Monk on Mar 06, 2016 at 15:00 UTC | |
by BrowserUk (Patriarch) on Mar 06, 2016 at 15:08 UTC | |
by Anonymous Monk on Mar 06, 2016 at 15:25 UTC | |
by BrowserUk (Patriarch) on Mar 06, 2016 at 15:34 UTC | |
| |
by Anonymous Monk on Mar 06, 2016 at 15:31 UTC | |
by BrowserUk (Patriarch) on Mar 06, 2016 at 15:37 UTC |