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-8/

{
  "context": "This criteria evaluates how well the engineer uses the workerpool package, specifically the pool.exec() method, to offload computational tasks to workers. The focus is on proper worker pool creation, task execution, and resource cleanup.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Pool creation",
      "description": "Creates a worker pool using workerpool.pool() to manage workers",
      "max_score": 15
    },
    {
      "name": "Dynamic function execution",
      "description": "Uses pool.exec() to execute functions dynamically by passing the function itself (not a string method name) for at least one of the processing tasks",
      "max_score": 25
    },
    {
      "name": "Function parameters",
      "description": "Correctly passes parameters to worker functions via the second argument of pool.exec(), such as pool.exec(fn, [param1, param2])",
      "max_score": 15
    },
    {
      "name": "Promise handling",
      "description": "Properly handles the Promise returned by pool.exec() using async/await or .then()/.catch() to retrieve results",
      "max_score": 15
    },
    {
      "name": "Error propagation",
      "description": "Allows errors from worker execution to propagate back through the Promise rejection mechanism",
      "max_score": 10
    },
    {
      "name": "Pool termination",
      "description": "Calls pool.terminate() to properly release worker pool resources in the cleanup function",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-workerpool

tile.json