summaryrefslogtreecommitdiff
path: root/node_modules/webworker-threads/src/load.ls
blob: 80650eb3206d92cf8b840eb39b98a96021cc3fe0 (plain)
1
2
3
4
5
6
7
8
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