in reply to IO::Uncompress::Gunzip thread safe?
Is IO::Uncompress::Gunzip thread safe?
I'm afraid the simple answer is no. And it would take some effort to make it so.
That said, the way your code is constructed, it does not benefit from being threaded, because you are forcing the threads to run serially, by following the thread creation immediately with a call to join, which blocks until the thread ends.
And as your posted code doesn't show what you are hoping to achieve by using threads -- just printing lines to the screen will never benefit from threading -- it is impossible to recommend a better approach.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: IO::Uncompress::Gunzip thread safe?
by chris212 (Scribe) on Nov 21, 2016 at 20:23 UTC | |
by Corion (Patriarch) on Nov 21, 2016 at 20:42 UTC | |
by chris212 (Scribe) on Nov 21, 2016 at 21:55 UTC | |
by BrowserUk (Patriarch) on Nov 21, 2016 at 23:27 UTC | |
by chris212 (Scribe) on Nov 22, 2016 at 15:11 UTC | |
| |
by Corion (Patriarch) on Nov 22, 2016 at 08:12 UTC |