PDA

View Full Version : [ANN] MBThreadingProxies and MBFileEvents




Nutter
Oct 30, 2007, 05:50 AM
MBThreadingProxies (http://www.milobird.com/blog/2007/10/mbthreadingproxies.html) is a category on NSObject which allows you to send a message to an object and have it delivered asynchronously on another thread. The following proxies are available:

– An operation queue proxy, which makes use of Leopard's NSOperation API to deliver the message on one or more background threads which are created, managed, and reused by the system. If the return value of the method you are calling is an object you will get back a future proxy.

– A main thread proxy, which delivers the message on the main thread.

– A background thread proxy, which delivers the message on a new background thread which exits after the message send completes.


MBFileEvents (http://www.milobird.com/blog/2007/10/mbfileevents.html) is a category on NSString which allows you to register to receive notifications when a file is modified. It provides an extremely light-weight interface wrapped around a kqueue/kevent implementation.


I hope someone finds these useful. I certainly did.