In theory threads are better for this since they both have the same data available and you just have to make sure synchronize access to the data.
In reality perl interpreter threads share only data you declare as shared. But that might be just right for your application. A second thread that sleeps until data arrives and then processes that data independently from the main thread. Or sets a shared variable which could be polled faster than a file descriptor, but that would have to be tested.
Also perl threads seem to have a bad reputation(??) but I might mix them up with the older threads before 5.6.
In reply to Re^3: using $SIG as an IPC interrupt?
by jethro
in thread using $SIG as an IPC interrupt?
by bobbob
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |