Dreckr / Worker

Utility for easy concurrency with isolates
MIT License
35 stars 10 forks source link

Need a way to tell worker to "shut down once all scheduled work is complete" #10

Closed dkornishev closed 10 years ago

dkornishev commented 10 years ago

Once I've scheduled all the tasks, I'd like to be able to tell worker to close after it is done executing.

Dreckr commented 10 years ago

There's some work to be done on how to handle scheduled tasks when 'close' is called. Currently, if a worker is closed with pending tasks, their futures hang forever. I think I'll add an optional flag to 'close' called 'whenDone'.

Dreckr commented 10 years ago

Fixed!