Since I am stuck with 5.16 I tried another module, Async. It seems to work ok but there's one bit of behavior that I didn't expect (though I probably should have): if the parent script finishes, the subroutine fired by Async finishes as well (I was testing some writes after a sleep command). I guess this makes sense since the process is dying and thus everything on it's stack gets popped but I didn't comprehend this when I first started thinking about the problem.
I haven't yet tested it within the OpenSIPs module and don't know enough about how it works to wager a guess as to whether it keeps a persistent Perl env going while it operates (I know it spawns individual worker processes so each of them might have a unique env as well). Is it an unreasonable expectation to keep looking for a module that might be able to "fire-and-forget" a subroutine that can keep running even if the parent process dies?
-
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.
|