CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-workerpool

Offload tasks to a pool of workers on node.js and in the browser

Overall
score

95%

Overview
Eval results
Files

rubric.jsonevals/scenario-10/

{
  "context": "This criteria evaluates how well the engineer uses the workerpool package to implement a resilient task processing system with proper worker crash detection, handling, and recovery. The focus is on correct usage of workerpool's pool creation, task execution, error propagation, and cleanup mechanisms.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Pool Creation",
      "description": "Uses workerpool.pool() to create a worker pool with appropriate configuration (specifying the worker script path)",
      "max_score": 15
    },
    {
      "name": "Worker Script Implementation",
      "description": "Creates a dedicated worker script that uses workerpool.worker() to register task functions that can be called from the main thread",
      "max_score": 20
    },
    {
      "name": "Task Execution",
      "description": "Uses pool.exec() to submit tasks to workers, correctly passing the method name and parameters",
      "max_score": 15
    },
    {
      "name": "Crash Simulation",
      "description": "Worker script correctly implements crash behavior (e.g., calling non-existent function or throwing unhandled error) when instructed",
      "max_score": 10
    },
    {
      "name": "Error Handling",
      "description": "Properly catches and handles errors from crashed workers using promise rejection handling (.catch() or try-catch with async/await)",
      "max_score": 15
    },
    {
      "name": "Pool Resilience",
      "description": "Demonstrates that the pool continues to function after a worker crash by successfully executing subsequent tasks",
      "max_score": 15
    },
    {
      "name": "Pool Cleanup",
      "description": "Uses pool.terminate() to properly clean up the worker pool and release resources",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-workerpool

tile.json