Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>libdispatch does not require calling <code>dispatch_main()</code>, it integrates with the main thread's runloop through the dispatch main queue, see <code>dispatch_get_main_queue(3)</code> and the <code>COMPATIBILITY</code> section therein.</p> <p>Executables that do not call <code>dispatch_main()</code> and want to use the main queue must run the main thread runloop in one of the common modes for blocks on the dispatch main queue to be processed; either indirectly via standard framework methods (e.g. <code>NSApplicationMain()</code>) or directly via CFRunLoop or NSRunLoop APIs.</p> <p>Please do not attempt to use the <code>_dispatch_main_queue_callback_4CF</code> symbol, it is an implementation detail internal to the library that is very likely to change in the future and any code that relies on it will break without warning.</p> <p>Integration of libdispatch with custom non-main-thread CFRunLoops can be achieved in a number of ways, such as via the <code>CFRunLoopPerformBlock()</code> API or custom runloop sources.</p> <hr> <p><strong>Update:</strong> on Linux, you'll have to modify the libdispatch sources, there is no existing support for interoperating with custom runloops AFAIK.</p> <p>The simplest way to integrate the main queue with an existing runloop on Linux is probably indeed going to be to call the (preferably renamed) <code>_dispatch_main_queue_callback_4CF()</code> function each time through the event loop, and replace <code>_dispatch_queue_wakeup_main()</code> with whatever method is appropriate to wake your runloop (e.g. write to a pipe the runloop is waiting on).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload