Offload tasks to a pool of workers on node.js and in the browser
Overall
score
95%
{
"context": "This criteria evaluates how effectively the engineer uses the workerpool library's worker proxy functionality to create a convenient interface for calling worker methods. The focus is on proper usage of pool creation, proxy creation, and worker method registration.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Worker pool creation",
"description": "Uses workerpool.pool() to create a worker pool instance with the path to the worker file",
"max_score": 15
},
{
"name": "Worker method registration",
"description": "Uses workerpool.worker() in the worker file to register the computational methods (factorial, isPrime, fibonacci)",
"max_score": 20
},
{
"name": "Proxy creation",
"description": "Uses pool.proxy() to create a proxy object that provides convenient access to worker methods",
"max_score": 30
},
{
"name": "Method invocation via proxy",
"description": "Calls worker methods through the proxy object (e.g., proxy.factorial(), proxy.isPrime(), proxy.fibonacci()) rather than using pool.exec()",
"max_score": 20
},
{
"name": "Pool termination",
"description": "Uses pool.terminate() to properly clean up the worker pool after all tasks complete",
"max_score": 15
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-workerpoolevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10