summaryrefslogtreecommitdiff
path: root/node_modules/webworker-threads/src/load.ls
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/webworker-threads/src/load.ls')
-rw-r--r--node_modules/webworker-threads/src/load.ls9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/webworker-threads/src/load.ls b/node_modules/webworker-threads/src/load.ls
new file mode 100644
index 0000000..80650eb
--- /dev/null
+++ b/node_modules/webworker-threads/src/load.ls
@@ -0,0 +1,9 @@
+function add-event-listener (event, cb)
+ @thread.on event, cb
+function close ()
+ @thread.emit \close
+function importScripts ()
+ for p in arguments
+ self.eval native_fs_.readFileSync(p, \utf8)
+onmessage = null
+thread.on \message (args) ~> onmessage? args