repl with async ops

62 views
Skip to first unread message

Dan Milon

unread,
Sep 19, 2012, 11:29:02 AM9/19/12
to nod...@googlegroups.com
Hello,

I am trying to create a repl, that will mostly call async ops.
How can i pause it until the async operation is over?

Something like the mongo repl.

Thanks,
danmilon.

Michael Schoonmaker

unread,
Sep 19, 2012, 5:49:33 PM9/19/12
to nod...@googlegroups.com
Dan,
What are your goals in pausing the REPL? Especially when working with the REPL on a running application, I find invoking async operations with a callback like this one to be a lot more useful. Not saying you have to use that module or that your motivations are incorrect - this just happens to be my solution to the problem of wanting to track multiple, often dependent, asynchronous REPL operations.

Another great solution is to have REPL scripts saved locally somewhere, inline callbacks and all, and use .load FILE to execute them.

YMMV,
Schoon


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: 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 post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply all
Reply to author
Forward
0 new messages