> On Jan 12, 2015, at 12:29 PM, Zeev Atlas <[email protected]> wrote: > > The sample code I've seen is starting child process and giving it a reference > to a callback function, so I perceived it as something like a 'fork' plus > 'and once you finish, please call back' which is an ingenious idea but > conceptually it is a fork, hence my question. > Is there any other use for callback mechanism?
Yeah. The difference is in the separation of the task: a unix process shares nothing, and returns nothing but a status code. You can do more with plumbing some streams together, but that's about the crux of it. With callbacks, this is more integrated in the runtime: The operations running and the callbacks all execute in the same process, and can share access to variables. Conceptually, at 30,000 feet there are a lot of similarities, but as you get closer, the differences become very apparent. Aria -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/04E6002D-C4BC-42F4-8060-6D21FC89043A%40nbtsc.org. For more options, visit https://groups.google.com/d/optout.
smime.p7s
Description: S/MIME cryptographic signature
