[libdispatch-dev] Windows compatibility

Kevin Van Vechten kvv at apple.com
Fri Sep 25 18:42:22 PDT 2009

On 25 Sep 2009, at 21:44, Mark Heily wrote:

> 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.

There may be benefit to using portions of APR on Windows, such as the  
thread pool.  However, as far as I can tell, their FIFO queues are not  
lock-free[1].  But I think the core queue logic of libdispatch should  
work fine on Windows if converted to use InterlockedExchange,  
InterlockedAdd, et al.


[1] http://svn.apache.org/repos/asf/apr/apr/trunk/util-misc/apr_queue.c

More information about the libdispatch-dev mailing list