Hacker News new | past | comments | ask | show | jobs | submit login

> Once the problem has been identified, the solution becomes obvious: make sure the work we push to thread pools describes the resources to acquire before running the code in a dedicated thread. ... My favourite approach assigns one global thread pool (queue) to each function or processing step.

The author seems to do a remarkable job of basically describing actors without mentioning the word "actor". I use GPars [1] with Groovy which explicitly supports exactly what they talk about in a very elegant manner. You create a variety of actors and allocate them to different parallel groups so they cannot starve each other of resources, and most of these issues become controllable.

Perhaps it is the Lisp context that resists lumping state into the equation, since Actors usually carry state?

[1] http://www.gpars.org/




Well yeah, Go channels/goroutines too, et al.

The problem isn't just partition of opaque work on threads though, but how to schedule work so that resources other than threads are used efficiently.

GPars etc don't cover that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: