Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Without some clues as to what is going on, it is impossible to diagnose the cause. And therefore difficult to suggest a solution. But I do understand your difficulty in providing those clues.

The single simplest help you could give us, is to post the code of a thread procedure that you know has silently died. If you have more than one, post them all.

One trick I've previously used to track down a similar problem is to wrap the thread procedure in a block eval. So for example, if you have code like this:

sub worker { .... } ... my @workers = map threads->new( \&worker, ... ), 1 .. $WORKERS;

Make the following simple modification:

sub worker { .... } sub proxy { my( $code, @args ) = @_; eval{ $code->( @args ) } or print $@; } ... my @workers = map threads->new( \&proxy, \&worker, ... ), 1 .. $WORKER +S;

This may yield some clues. But posting the code of known to (sometimes) silently die thread subs would likely get better answers.


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.

In reply to Re: Why do my threads sometimes die silenty? by BrowserUk
in thread Why do my threads sometimes die silenty? by alain_desilets

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-24 23:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found