Currently, CFRunLoop relies on dispatch_get_main_queue_eventfd_np() and dispatch_main_queue_drain_np() for GCD integration. More information can be had here (http://nickhutchinson.me/libdispatch/). According to the website, these functions were added for Glib's run loop integration. Honestly, that's about as much as I can tell you on the technical side. It would be nice to have CFRunLoop/NSRunLoop built on top of GCD, but I'm not sure what the technical hurdles are.
As for the issue at hand, since Lubos needs the GCD integration for now, I'm going to make it optional as follows: 1. Replace --without-gcd with --with-gcd. 2. If no option is given, test for dispatch_..._np function. If it exists, define HAVE_LIBDISPATCH and do nothing, otherwise. 3. If --with-gcd is given, do the same test as above but produce an error and stop if function is not found. 4. If --without-gcd is given, skip the test altogether. On Sat, Feb 7, 2015 at 10:42 AM, David Chisnall <thera...@sucs.org> wrote: > What are the extensions? We currently have pluggable implementations of > NSRunLoop for Windows / *NIX, it would be nice to have an implementation > that used libdispatch where available, so that we'd build the run loop on > top of libdispatch (as Apple does), rather than trying to build it along > side and then integrate it. > > David > > > On 6 Feb 2015, at 18:10, Stefan Bidigaray <stefanb...@gmail.com> wrote: > > > > Some of you might have glanced at the discussion concerning the support > of GCD in CoreBase. I'd like to get some input on what to do going > forward, so please chime in if you can. > > > > Essentially, the problem is that in order to integrate GCD with > CFRunLoop, we need to use non-public APIs. However, these non-public APIs > are not supported by the official GCD implementation, only by a Linux only > extension to GCD (http://nickhutchinson.me/libdispatch/). The obvious > problem here is that this solution only works on Linux, but another problem > is that it is not supported (read, not packaged) by the most popular Linux > distributions, including Debian and Ubuntu. > > > > My gut feeling here is that we should not support this unofficial > version of libdispatch and, instead, drop support for the GCD integration > until a more cross-platform solution can be implemented, which may be > never. I'd like to get some input here, as another solution may simply be > to disable GCD support by default, unless the required functions are > found. I'm leaning somewhat against the latter for the simple reason that > I would like CoreBase to truly be cross-platform, not just support a > hodge-podge of features that may or may not be available for a particular > platform. Or in this case, a feature that is only available on 1 of the 3 > officially supported platforms (Linux, BSD and Windows). > > > > Again, I would really appreciate some input and your thoughts. Thanks > > _______________________________________________ > > Gnustep-dev mailing list > > Gnustep-dev@gnu.org > > https://lists.gnu.org/mailman/listinfo/gnustep-dev > > > > -- > This email complies with ISO 3103 > >
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev