[libdispatch-dev] Windows compatibility
Robert N. M. Watson
robert at fledge.watson.org
Fri Sep 25 16:14:07 PDT 2009
On 25 Sep 2009, at 21:44, Mark Heily wrote:
>> This is my intuition also: I think you'd want to have an entirely
>> independent implementation using native Windows primitives, and
>> simply
>> give it the same (or similar) API on top.
>
> Has anyone considered using the Apache Portable Runtime (APR)? They
> have many
> portable goodies including lock-free FIFO queues and thread pools. If
> libdispatch was rewritten to use APR instead of POSIX interfaces, it
> should
> work fine on Windows.
Hi Mark--
This is an interesting idea. My first thought was to look at whether
pthreads + libevent would provide a reasonable foundation for a
libnqkqueue ("not quite kqueue") wrapper library implementing
(roughly) the kqueue interface on non-supporting systems. There are
some problems with this idea, not least that libevent can't provided a
unified event source for some of the types of events supported by
kqueue. On the other hand, it would offer significantly more
portability (at the cost of less efficiency and fewer capabilities).
I've not looked at apr yet, but maybe this would be a better
portability foundation. I need to spend some time comparing semantics
and capabilities of kqueue and libevent anyway, and I'll add apr to
the mix.
Robert
More information about the libdispatch-dev
mailing list