I don't believe threads can be killed (sanely), so I'd recommend using child processes instead of threads.
Scenario 1: The child processes interface with the database directly and don't tell the parent when they're done.
Solution: You could use wait with a calculated timeout imposed by alarm.
Scenario 2: The child processes let the parent know when they're done, possibly sending the data to the parent instead of interfacing with the database.
Solution: You could use select with a calculated timeout.
In reply to Re: Perl Threads
by ikegami
in thread Perl Threads
by jpk236
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |