Offload tasks to a pool of workers on node.js and in the browser
Overall
score
95%
{
"context": "This criteria evaluates the engineer's proficiency in using workerpool's advanced promise features, specifically Promise.all() for concurrent execution, .cancel() for cancellation, .timeout() for time limits, and .always()/.finally() for cleanup operations. The assessment focuses on correct usage of these package-specific APIs.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Worker pool creation",
"description": "Creates a worker pool using workerpool.pool() and properly manages its lifecycle (creation and termination)",
"max_score": 10
},
{
"name": "Promise.all() usage",
"description": "Uses workerpool.Promise.all() to execute multiple tasks concurrently and wait for all results, correctly handling the returned array",
"max_score": 20
},
{
"name": "Task cancellation",
"description": "Uses the .cancel() method on workerpool promises to cancel running tasks",
"max_score": 20
},
{
"name": "CancellationError detection",
"description": "Properly detects cancellation errors using instanceof workerpool.Promise.CancellationError or similar error type checking",
"max_score": 15
},
{
"name": "Timeout implementation",
"description": "Uses the .timeout() method on workerpool promises to enforce time limits on task execution",
"max_score": 15
},
{
"name": "TimeoutError detection",
"description": "Properly detects timeout errors using instanceof workerpool.Promise.TimeoutError or similar error type checking",
"max_score": 10
},
{
"name": "Cleanup operations",
"description": "Uses .always() or .finally() methods on workerpool promises to execute cleanup logic regardless of task outcome (success, failure, cancellation, or timeout)",
"max_score": 10
}
]
}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