I want a thread pool that will allow jobs to be scheduled after a specific delay or at an absolute time, for which I would use ScheduledExecutorService in Java. Is anybody familiar with a C library providing equivalent functionality? Actually, I want somethi开发者_如何学运维ng with even more features than provided by Java: I want new threads to be created as necessary instead of being chosen from a fixed-size pool, which would be the equivalent of java.util.concurrent.Executors implementing something like a newCachedScheduledThreadPool() method. Seems like I want a lot, is it Christmas yet?
You might try Glib for thread pools:
http://developer.gnome.org/glib/2.28/glib-Thread-Pools.html
I know this doesn't quite give you the equivalent of ScheduledExecutorService, but it seems it should be relatively easy to write some wrapper code which could implement the scheduling part.
加载中,请稍侯......
精彩评论