TooTallNate / NodObjC

The Node.js ⇆ Objective-C bridge

Home Page:http://tootallnate.github.io/NodObjC

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wait for objc block

lukaskollmer opened this issue · comments

I want to wait for an async objc block to finish before returning from a JavaScript function. The problem is that the node process exists before the block is called by Cocoa. How can I wait for the block and make sure node doesn't exit until after the block was called?

I know that in Objective-C, I can use a dispatch_semaphore_t, but I couldn't get that working via NodObjC.

Any ideas?