Schedule the JavaScript function work on the GCD queue specified by queue. An NSAutoreleasePool is created just before calling work, and cleaned up on return.
work
queue
E.g. on macOS:
const { NSSound } = ObjC.classes; ObjC.schedule(ObjC.mainQueue, () => { const sound = NSSound.alloc().initWithContentsOfFile_byReference_("/Users/oleavr/.Trash/test.mp3", true).autorelease(); sound.play(); });
GCD queue to schedule work on.
Function to call on the specified queue.
Generated using TypeDoc
Schedule the JavaScript function
work
on the GCD queue specified byqueue
. An NSAutoreleasePool is created just before callingwork
, and cleaned up on return.E.g. on macOS: