[libdispatch-dev] I missed the intro message ;)
Kevin Van Vechten
kvv at apple.com
Sat Sep 12 21:55:58 PDT 2009
On Sep 11, 2009, at 11:12 AM, Matt Wright wrote:
> On a similar note to some of the other things I mentioned. When the
> project page talks about the kernel support, are we just talking
> kevent/kqueues here? Or are there more darwin kernel level things at
> work. I'm looking more for the limitations when targeting Leopard,
> rather than porting to non-Darwin, and moving towards using
> libdispatch linked to an application without needing to load kexts/
> etc on Leopard.
In terms of API, there's not much difference between what is provided
by the kernel in Leopard and Snow Leopard. However, there were fixes
made in Snow Leopard to issues exposed by libdispatch (for example, to
portions of kqueue that weren't heavily utilized before libdispatch).
I suspect much of the core functionality of libdispatch could be made
to work fine on Leopard, but there may be some problematic edge cases
with a few of the dispatch source types.
> I also found it interesting that you built it so it could run
> without blocks. I found when writing WW that life was ever so much
> easier using blocks to my advantage during implementation.
Blocks are great and we expect virtually all clients of libdispatch
will use them because of the convenience they provide. The choice not
to use blocks in the implementation of libdispatch itself was due to
the desire to avoid any locks or heap allocations in the "fast path"
of the dispatch mechanism.
More information about the libdispatch-dev