阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js worker.terminate

      Node.js worker.terminate([callback])

      新增于: v10.5.0

      • callback < Function>
        • err < Error>
        • exitCode < integer>

      Stop all JavaScript execution in the worker thread as soon as possible. callback is an optional function that is invoked once this operation is known to have completed.

      Warning: Currently, not all code in the internals of Node.js is prepared to expect termination at arbitrary points in time and may crash if it encounters that condition. Consequently, only call .terminate() if it is known that the Worker thread is not accessing Node.js core modules other than what is exposed in the worker module.


      更多内容请参考:Node.js worker_threads 工作线程,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录