06 Sep 2012 03:42:08 UTC
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (81 / 184 / 33)
- KwaliteeBus factor: 0
- % Coverage
- License: unknown
- Activity24 month
- Download (7.71KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionPANIKAL Kal Aeolianand 1 contributors
- Kal Aeolian
Changes for version 0.06
- Removed semaphore to control worker count, seems pointless if every ++ on count I ->up() the semaphore.
- Removed Stop (!!!!) for boss and workers.
- Replaced stop_boss/worker with pause_boss and pause_worker. Threads don't die. They just go to sleep.
- *New method* Thread::Workers::set_drain_cb(\&method_deals_with_drained_queue);
- You may not want to lose your queue. You can set a sig INT/KILL hook.
- Thread::Workers::drain() will stop the boss and workers if not stopped, and drain the queue, and feed the data to the callback you set with set_drain_cb.
- drain() is the preferred way to kill all the threads, it does things in the right order to drain the log and queue.
- Fixed a bug where workers weren't reading in the right wakeup value, but it worked on accident. Now It Works for the right reason. ;)
- Removed _tid var, implicit in _thread key
- Fixed not locking _worker_cmd when stopping workers (same on boss_cmd)
- Added in locking to all *reads* of _worker_cmd also. Read someplace this was necessary on older perls.
- Even more POD fixes (I'll get POD to work right one day!)
- In a sleep state, workers change their interval to 1 sec. After waking, they go back to normal.
- Same for the boss on sleep state interval changes
ModulesCreates a boss which feeds a queue consumed by workers.
Module Install Instructions
To install Thread::Workers, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Thread::Workers
For more information on module installation, please visit the detailed CPAN module installation guide.