in reply to Re^2: Thread::Pool::Simple || !
in thread Thread::Pool::Simple || !
The failures happen intermittently recurring anywhere from 1 hour to 1 week/month. My guess is ...
I want to go back and test it against the models on CPAN that I tried earlier
To paraphrase: I've a bug in my code which I can't be bothered to track down and I'm hoping there is a CPAN module that will allow me to conceal it.
BrowserUK, my threads are wrappped as you have shown.
Then how do you know threads are failing? Are you logging errors? Logging when threads end? How?
My gut is still telling me that there is a simpler approach to this than what I have. If there isn't, then I need to spiff up my thread management kit and put it up on CPAN.
NO! NO! Please no! There is enough ill-conceived, bug-ridden, utterly useless, "threading management" crap on CPAN already.
It is no wonder so many people are put off from using Perl's threading, given their first experiences of it are installing a module with a fanciful named, (and often as not, with a positive CPAN rating or two from know-nothing sycophants), only to discover that it is either completely broken -- or worse -- kind of works some of the time, but every now and again, silently throws away a bunch of work items.
Even if your application is tolerant of your threads module throwing work away every now and again, please don't "spiff it up" with a little concealer and foist it upon unsuspecting others.
If you truly believe that your threads management module is a) generic enough; b) lightweight enough; and c) reliable enough; to have the potential to become a widely deployable thread-pool module -- and you obviously aren't there yet -- then post it here along with your current application -- suitably cut-cown and anonymised as necessary -- and let us help you solve the known problem.
Once we've done that, I'll willingly throw a few of my testcase applications at it and see if it a) actually works for them; b) is actually any simpler and/or better than hand-coding.
As you may be aware, I am pretty skeptical that it is possible to write a properly generic thread-pool solution that isn't actually more complex than hand-coding them to fit the specific application. But I am willing to be proved wrong. And more than willing to help prove me wrong, if I see an architecture/API that seems to work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Thread::Pool::Simple || !
by learnedbyerror (Monk) on Jul 18, 2012 at 19:02 UTC | |
by BrowserUk (Patriarch) on Jul 18, 2012 at 19:31 UTC | |
by learnedbyerror (Monk) on Jul 18, 2012 at 20:49 UTC | |
by BrowserUk (Patriarch) on Jul 18, 2012 at 21:17 UTC | |
by bulk88 (Priest) on Jul 18, 2012 at 23:10 UTC | |
by BrowserUk (Patriarch) on Jul 18, 2012 at 19:21 UTC |