I'm hoping to convert this 10.6 code to 10.5:
@autoreleasepool {
dispatch_queue_t queue = dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue,^(){
// contact webservice for IP-address information
// update UI (NSMenuItem)
});
}
What I have so far:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
// background process
// contact webservice for IP-address information
// update UI (NSMenuItem)
// end background process
[pool drain];
It appears that a can use dispatch_async
, but not blocks
and dispatch_queue_t
.