in reply to Re^7: Why do my threads sometimes die silenty?
in thread Why do my threads sometimes die silenty?
Well, what I need to do is a bit more complicated than that ;-).
Basically, I have a very complex object of class WeBiText. The object carries out a complex search algorithm, part of which, called the L1 Search, does a number of searches on Yahoo, that produces hits to be processed by the rest of the search algorithm. Because the Yahoo searches take a long time to execute, I want the L1 search to be done in a separate thread, and in such a way that it communicates the hits it finds back to the main search algorithm as soon as it finds them. That way, the main search doesn't have to wait for the complete set of L1 hits before it starts doing its work.
There are issues that complicates things.
- WeBiText is not thread safe, because it needs some modules which are not thread-safe.
- A consequence of this is that all threads in the thread pool must be created before any instance of WeBiText is created.
- Another consequence is that WeBiText instances can't be shared between threads and must instead be serialized and deserialized across threads.
- Also, I run hundreds of automated tests on WeBiText, using PerlUnit
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^9: Why do my threads sometimes die silenty?
by BrowserUk (Patriarch) on Sep 22, 2011 at 11:56 UTC |
In Section
Seekers of Perl Wisdom