Digging this topic again, I'm unable to make the worker process log
anything on shutdown...tried with internalMessage, message(worker.send()),
nothing happens.

On Wed, Dec 17, 2014 at 3:16 AM, Ryan Graham <r.m.gra...@gmail.com> wrote:

> Can you share how you accomplished this? (in code, if possible.. JS is way
> better than English with the diversity of backgrounds and native languages
> seen on this list)
>
> I'm not aware of a JS level API in node core that provides what you
> described, so like Sam, I assumed you meant a busy loop which generally
> would indeed use 100% CPU and block your event loop.
>
> Did you mean an arbitrarily long process.nextTick() chain, instead? The
> behaviour of which is so different from "once per tick" that it's a shame
> the name hasn't been changed! Your check would be called up to 1000 times
> (by default) per tick and then be queued into the next tick.
>
> Or did you mean sprinkling one-off process.nextTick() calls throughout
> your code so that a check is queued at least once per event loop tick?
>
> ~Ryan
>
> On Tue, Dec 16, 2014 at 7:39 PM, Ω Alisson <thelinuxl...@gmail.com> wrote:
>
>> Well I did it and the CPU is running at 0.2%
>>
>> On Tue, Dec 16, 2014 at 11:22 PM, Sam Roberts <s...@strongloop.com> wrote:
>>>
>>> On Wed, Dec 10, 2014 at 8:15 PM, Ω Alisson <thelinuxl...@gmail.com>
>>> wrote:
>>> > Interesting Sam, but what if I set a flag that is checked every
>>> > process.nextTick
>>>
>>> You will eat 100% CPU, rather than waiting on event from the master
>>> saying that its time to go away, and being able to do the cleanup you
>>> want:
>>>
>>> > suspends redis updates, so what's left is finishing
>>> > iterating over in-memory items?
>>>
>>
>
> --
> http://twitter.com/rmgraham
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nodejs+unsubscr...@googlegroups.com.
> To post to this group, send email to nodejs@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/CAGjmZGx%2BbWyTuswZ4Rg-Z76wDRQTqakpwDEVoV%2BT_s4bkXLYzQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/nodejs/CAGjmZGx%2BbWyTuswZ4Rg-Z76wDRQTqakpwDEVoV%2BT_s4bkXLYzQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CACZE8Y5hYUv2YqNcSZwVcu4ng29v-qCyOaA%3D%2BCHqS5F7%3DF4TAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to