Friday, September 11, 2009

GCD Dispatch Sources

Mike Ash:

This also has a nice benefit over the standard Unix way of doing things in that there’s no need to write a loop. With typical calls to read, you always have to be wary because it can return less data than requested, and can also suffer from transient “errors” like EINTR (interrupted system call). With GCD, you can just bail out in those cases and not do anything. If you leave unread data on the file descriptor, GCD will just invoke your handler a second time.

Grand Central is now open source. This is good, although I don’t think it’s as big a deal as some people are saying. Personally, I think the blocks technology is more interesting and important.

Comments RSS · Twitter

Leave a Comment