web-threads
Version:
generic threads using web workers for the web
16 lines (14 loc) • 315 B
JavaScript
import { execute } from '../lib/web-threads'
function Func(value){
this.value = value
}
Func.prototype.foo = function(otherValue){
return this.value * otherValue
};
var instance = new Func(2)
let params = {
fn: instance.foo,
context: instance,
args: [4]
}
export default () => execute(params)