[ANN] MBThreadingProxies and MBFileEvents

Discussion in 'Mac Programming' started by Nutter, Oct 30, 2007.

  1. Nutter macrumors 6502

    Mar 31, 2005
    London, England
    MBThreadingProxies 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 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.

Share This Page