in reply to Re^6: Threading in a loop
in thread Threading in a loop
You code above has the added disadvantage of possibly printing some values twice while skipping a value later on.
Wise synchronization of threads will usually involve either queues or semaphores. Feel free to look into Thread::Queue or Thread::Semaphore for implementation details.
|
|---|