开发者

C language library equivalent to Java ScheduledExecutorService?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜