On Saturday, January 17, 2015 at 10:53:36 AM UTC-5, Test This wrote:
>
> Some basic questions: 
>
> We know that Node is blocking on cpu intensive tasks. If I use the async 
> option, are the calculations run separately. That is does it allow the mode 
> process to continue with its event loop. 


The answer is yes, and the reason is though node is singly threaded, native 
modules can be multi-threaded,
the main thread accepts work and then queues it along with the function to 
return the result to and returns
immediately meanwhile a couple of other threads dequeue the work evaluate 
and then enqueue the result and
finally the main thread is signaled using uv_async_send.
 

> If the answer is yes, what happens when julia is busy with a previous 
> calculation and a new one is passed to it? 
>

Currently there's good news and bad news.  The good news is that node-julia 
async calls will not block and so
node will not block, but the bad news is the the evaluator running in a 
separate thread waits for the result before
moving on to the next thing.  
 

>
> Thanks so much for creating this.


Oh man, you're welcome, most definitely.
 

Reply via email to