Had to visit the passport office yesterday, and since I had some time to kill I took a look at this. Overall, looks sane and has the most important usability property over work queues -- no need to track if a task is already scheduled. Couple of comments / questions -- 1- Seems to depend on another facility -- threadpool -- that I also found in your sandbox and took a peek at. Wondering that other applications for threadpool that you had in mind. 2- Mildly annoying that "tasks" don't have a simply way to get the context they need to run -- they don't contain a "void *ctx", so users of the API are reduced to doing memory offset shenanigans to recover their context. Not a deal-breaker, but wondering if burning the memory on a pointer would be worth the convenience factor.
-- thorpej
|