On Mon, Oct 20, 2014 at 1:14 AM, <ok@cs.otago.ac.nz> wrote:
There are apparently quite a few things that can be done nicely
in OS X using Mach facilities, but I have not yet succeeded in
finding useful documentation for Mach, which has probably kept me
out of more trouble than I realise.

Apple pushes grand central dispatch (aka libdispatch) for concurrency. Not clear if it'll help in this case, though.  It's interesting technology, and at least the userland parts are open source, and have been ported to FreeBSD as the libdispatch port.