What is the easiest way to add an immediate one-time task to a CFRunLoop
from a C/C++ program, that is, a callback which must be invoked by the run-loop before it blocks again.
According to the documentation, we have CFRunLoopPerformBlock()
, but the problem with it, is that it uses the block-notation which requires Objective-C compilation mode.
Is there something similar to CFRunLoopPerformBlock()
which is available to a C/C++ program, or am I forced to use a zero-delay timer?