UNPKG
thread-pool
Version:
latest (0.0.1)
0.0.1
Simple thread pooling for Node.js.
github.com/jgnewman/thread-pool
jgnewman/thread-pool
thread-pool
/
test
/
example-task.js
9 lines
(8 loc)
•
229 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
module
.
exports
=
function
(
handler
) { handler.
send
(
'Hello there'
).
onReply
(
function
(
data
) {
console
.
log
(
'Got reply from main thread'
, data); });
setTimeout
(
function
(
) { handler.
finish
(handler.
init
); },
2000
); };