Jump to content

WorkerPool : a web workers pool handler


Ezelia
 Share

Recommended Posts

I just released a worker pool handler I'm using in some of my projects,

The source code is in TypeScript and is available here : https://github.com/Ezelia/WorkerPool

 

a live demo is available here : http://ezelia.com/wp-content/uploads/labs/WorkerPool/index.html

 

 

The aproach I used is to initialize a pool for each worker script.

a pool is initialized with the number of workers passed in argument.

 

while you push new tasks the pool delegate the job to the worker who have the smaller tasks list.

 

 

This is the first public release many bug may be there, also, I didn't find a totaly unobstructive aproach to identifie witch task belong to witch worker, so the task id is sent to the worker and the worker should send back this taskId when the job is finished.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...