how do i create a non-blocking asynchronous function in node.js?

前端 未结 10 954
悲&欢浪女
悲&欢浪女 2020-12-02 13:27

How do I create a non-blocking asynchronous function? Below is what I\'m trying to achieve but my program is still blocking...

var sys = require(\"sys\");

f         


        
10条回答
  •  一向
    一向 (楼主)
    2020-12-02 14:25

    You need to run your blocking function in a separate process.

    This module can help: http://github.com/cramforce/node-worker

提交回复
热议问题