-
Notifications
You must be signed in to change notification settings - Fork 291
Fix runloop integration for libdispatch from swift #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,12 @@ | ||
| 2019-11-26 Niels Grewe <[email protected]> | ||
|
|
||
| * Source/NSRunLoop.m: | ||
| * Tests/base/NSRunLoop/dispatch.m: | ||
| Fix runloop integration for libdispatch from swift-corelibs | ||
| * .travis.yml: | ||
| * travis-deps.yml: | ||
| Fix CI related to libdispatch. | ||
|
|
||
| 2019-11-15 Frederik Seiffert <[email protected]> | ||
|
|
||
| * configure.ac: check for unwind.h | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,14 +8,12 @@ | |
|
|
||
| const NSTimeInterval kDelay = 0.01; | ||
|
|
||
| #if HAVE_LIBDISPATCH_RUNLOOP && __has_feature(blocks) | ||
| #if GS_USE_LIBDISPATCH_RUNLOOP && __has_feature(blocks) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wouldn't it be easier to keep this code here identical to the one in NSRunLoop.m? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the implementation, we only need to call C functions from libdispatch, but in the test, we also need to schedule blocks onto the main queue to verify that running the runloop will drain the queue as well. Hence the subtle difference: The test code depends on a blocks capable compiler, the implementation code doesn't. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I was rather aiming at the lines below, not that one by itself. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, got it: The This is very defensive anyways: I haven't seen a build of libdispatch that didn't place its headers in subdirectory for a long time. |
||
| # define DISPATCH_RL_INTEGRATION 1 | ||
| # ifdef HAVE_DISPATCH_H | ||
| # if __has_include(<dispatch.h>) | ||
| # include <dispatch.h> | ||
| # else | ||
| # ifdef HAVE_DISPATCH_DISPATCH_H | ||
| # include <dispatch/dispatch.h> | ||
| # endif | ||
| # include <dispatch/dispatch.h> | ||
| # endif | ||
| #endif | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update even further?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, that makes sense. I was living in the past… and forgot that bionic is the newest Ubuntu LTS version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, that gives us some unrelated test failures for NSURL-related things 🤔. I guess I'll revert to xenial for the time being and investigate those independently....