in reply to Re: thread::share problem
in thread thread::share problem
Ok no problem of the code. I understand that I must use the lock() function.But what is this;
Scalars leaked: 18 < this is no problem
Scalars leaked: 18
Scalars leaked: 18
panic: COND_DESTROY (6). what is this?
There are too many bugs in perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: thread::share problem
by BrowserUk (Patriarch) on May 12, 2012 at 23:07 UTC | |
panic: COND_DESTROY (6). what is this? It means that when perl came to destroy a condition var, when it attempted to close the handle to the associated semaphore, the handle was invalid. The usual cause of this is an attempt to destroy the condition var a second time. And the usual cause of that is programmer error. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
by Anonymous Monk on May 13, 2012 at 01:45 UTC | |
Ok here's my advanced demo codes
| [reply] [d/l] |
by BrowserUk (Patriarch) on May 13, 2012 at 08:26 UTC | |
Okay. The almost certain cause of the panic:COND_DESTROY message is because you are defining thread functions inside other functions. Here:
And here:
But, your code is so badly written and formatted that I am not prepared to expend any energies on trying to fix it. My advice to you is that you should either: a) start with a simpler project and learn to write clean, structured code before you attempt something as complex as this; or b) employ a proper programmer to write this for you. Have you ever watched one of the TV game-shows where they bring in an expert pizza maker or master potter or similar, and have them demonstrate their skills for about 2 minutes; before asking one or more of their Of course, as expected, the contestants end up covered in pizza dough/wet clay and offer up an unrecognisable pile of something for the expert to judge. In this context, your posted code is that unrecognisable pile of something. Sorry if that is harsh, but not everyone is cut out to be a programmer. If you posted a new version that was properly indented and compiled with strict & warnings, I might take another look, but as is: <Reveal this spoiler or all in this thread>
I'm not prepared to expend any more of my time on it. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
by merlol (Initiate) on May 13, 2012 at 10:35 UTC | |
by merlol (Initiate) on May 13, 2012 at 02:03 UTC | |
Do you have other methods about of multithreading? I'm used before "Thread" module for multithreading for controlling running threads, but Active State Perl Dev Kit so, "perlapp" cannot compile my project and getting same errors. Like this ; "Undefined ... &Thread::threads::running" and program stopping. Therefore i'm using "Thread::Pool::Simple". | [reply] |