Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I was getting Free to wrong pool last year when I attempted to use the
Windows Fork with Tk being used in the child process. The details of
my problem set were different than yours but perhaps the overall
problem set and solution approach could be similar.

After some digging, the problem turned out that Tk was not thread
safe. My answer was to use the fork earlier on in the program, and not
"use Tk" in any module prior to the module that used the fork.

The parent does some things and waits a prescribed time for the child
to finish just as before, only instead of the child pop up any error
message, which is what used Tk, the child now writes any reports to a
temp file (that is known to the parent). After the child exits - or
is killed by the parent - the parent then returns the file contents
to the caller, and a subsequent module handles using Tk to pop up any
error messages.

One more thing. If you decide to use the Windows fork, do not use the
sleep command in the parent or child. It hangs. Instead, use

select(undef, undef, undef,whatever);

In reply to Re^4: LWP, DBI and Free to Wrong Pool error by mnooning
in thread LWP, DBI and Free to Wrong Pool error by cormanaz

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 lurking in the Monastery: (9)
As of 2024-04-19 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found