You should definitely also have a look at Fabric Engine: http://fabric-engine.com/
It is specifically designed for the sort problems :) On 9 April 2012 16:08, Shin Suzuki <[email protected]> wrote: > Hi, > > Here I wrote a simple module to make functions asynchronous. > > https://github.com/shinout/standalone > > > With this, synchronous methods can be called by the same method > asynchonously. > Also this module can be available in browsers (using WebWorker API). > > Thanks. > > > > 2012/4/9 Roly Fentanes <[email protected]> >> >> You could use just one child process that you spawn at the start of your >> app. Then every time you need to do the calculation, you tell it to. And it >> will get back to you when it's finished. >> >> Would only work there's little chance for many calculations to be needed >> at once. Or you could spawn a few more workers as needed. >> >> >> On Monday, April 9, 2012 3:34:05 AM UTC-7, Jeremy Rudd wrote: >>> >>> Hi all, >>> >>> I've got a couple of long-running functions that use BigIntegers and the >>> like for some financial calculations. These take a few seconds to execute. >>> Now a few seconds of CPU on the main node thread means all other activity >>> grinds to a halt. What's the easiest way to call these functions >>> asynchronously? ie, on another thread? >>> >>> Should I be making a module? Is it possible without a module? Should I be >>> using child_process? >>> >>> Any pointers or tips appreciated. >>> Thank you. >> >> -- >> 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 [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en > > > -- > 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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
