![]() Worker, isMainThread, parentPort, workerData, So by transferring ArrayBuffer instances or sharing SharedArrayBuffer Unlike child_process or cluster, worker_threads can share memory. The Node.js built-inĪsynchronous I/O operations are more efficient than Workers can be. They do not help much with I/O-intensive work. Workers (threads) are useful for performing CPU-intensive JavaScript operations. ![]() To access it: const worker = require( 'node:worker_threads') copy ![]() The node:worker_threads module enables the use of threads that execute Launching worker threads from preload scripts.Considerations when cloning objects with prototypes, classes, and accessors.Considerations when transferring TypedArrays and Buffers.Class: BroadcastChannel extends EventTarget.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |