UNPKG

web-threads

Version:

generic threads using web workers for the web

15 lines (13 loc) 290 B
import { execute } from '../lib/web-threads' function Func(value){ this.value = value } Func.prototype.foo = function(){ return this.value * this.value }; var instance = new Func(2) let params = { fn: instance.foo, context: instance } export default () => execute(params)