tasks.put(invocation.id(), this);
}
private NSInvocationOperation createInvocation(final ObjCObject toInvoke) {
return doWithAutoreleasePool(new Callable<NSInvocationOperation> () {
public NSInvocationOperation call() {
NSInvocationOperation result = NSInvocationOperation.CLASS.alloc();
//when the NSOperationQueue executes the NSInvocationOperation, run() is
//called on this object.
result = result.initWithTarget_selector_object(toInvoke.id(), RUN_SELECTOR, null);
return result;
}
});
}