Final cleanup for Dispatcher conversion#1016
Merged
Conversation
mxcl
pushed a commit
that referenced
this pull request
Feb 28, 2019
* Additional comments for Dispatcher.swift * Remove .promise namespacer from Dispatcher.dispatch -> Guarantee/Promise * Convert to LogEvent system, groom logging and tests * Expand DispatchQueueDispatcher to hold both a DispatchGroup and a QoS * Finalize dispatcher.dispatch and related tests * Clean up DispatchQueue wrapping, avoid assuming any particular defaults * CurrentThreadDispatcher.dispatch needn't mark closure arg as @escaping * Test that DispatchQueue.pmkDefault is identifiable with === * Documentation updates * Build any v7* branch * Rebuild Linux test manifest, check return types of Dispatcher.dispatch {}
mxcl
pushed a commit
that referenced
this pull request
Feb 28, 2019
* Additional comments for Dispatcher.swift * Remove .promise namespacer from Dispatcher.dispatch -> Guarantee/Promise * Convert to LogEvent system, groom logging and tests * Expand DispatchQueueDispatcher to hold both a DispatchGroup and a QoS * Finalize dispatcher.dispatch and related tests * Clean up DispatchQueue wrapping, avoid assuming any particular defaults * CurrentThreadDispatcher.dispatch needn't mark closure arg as @escaping * Test that DispatchQueue.pmkDefault is identifiable with === * Documentation updates * Build any v7* branch * Rebuild Linux test manifest, check return types of Dispatcher.dispatch {}
mxcl
pushed a commit
that referenced
this pull request
Mar 1, 2019
* Additional comments for Dispatcher.swift * Remove .promise namespacer from Dispatcher.dispatch -> Guarantee/Promise * Convert to LogEvent system, groom logging and tests * Expand DispatchQueueDispatcher to hold both a DispatchGroup and a QoS * Finalize dispatcher.dispatch and related tests * Clean up DispatchQueue wrapping, avoid assuming any particular defaults * CurrentThreadDispatcher.dispatch needn't mark closure arg as @escaping * Test that DispatchQueue.pmkDefault is identifiable with === * Documentation updates * Build any v7* branch * Rebuild Linux test manifest, check return types of Dispatcher.dispatch {}
mxcl
pushed a commit
that referenced
this pull request
Mar 26, 2019
* Additional comments for Dispatcher.swift * Remove .promise namespacer from Dispatcher.dispatch -> Guarantee/Promise * Convert to LogEvent system, groom logging and tests * Expand DispatchQueueDispatcher to hold both a DispatchGroup and a QoS * Finalize dispatcher.dispatch and related tests * Clean up DispatchQueue wrapping, avoid assuming any particular defaults * CurrentThreadDispatcher.dispatch needn't mark closure arg as @escaping * Test that DispatchQueue.pmkDefault is identifiable with === * Documentation updates * Build any v7* branch * Rebuild Linux test manifest, check return types of Dispatcher.dispatch {}
mxcl
pushed a commit
that referenced
this pull request
Apr 8, 2019
* Additional comments for Dispatcher.swift * Remove .promise namespacer from Dispatcher.dispatch -> Guarantee/Promise * Convert to LogEvent system, groom logging and tests * Expand DispatchQueueDispatcher to hold both a DispatchGroup and a QoS * Finalize dispatcher.dispatch and related tests * Clean up DispatchQueue wrapping, avoid assuming any particular defaults * CurrentThreadDispatcher.dispatch needn't mark closure arg as @escaping * Test that DispatchQueue.pmkDefault is identifiable with === * Documentation updates * Build any v7* branch * Rebuild Linux test manifest, check return types of Dispatcher.dispatch {}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should be ready to go. Main changes:
Adds documentation. It seemed best to keep most existing docs and examples in terms of
conf.QandDispatchQueuesince most people will never need to concern themselves with dispatchers. I just wanted to leave some breadcrumbs for people who are looking, so there's a blurb in theAppendixthat describesDispatcherin a bit more detail. There are a few other incidental doc changes as well, mostly about versioning.Inline documentation groomed and tested.
DispatchQueueDispatchercan now accommodate aDispatchGroupand QoS in addition to work item flags. These aren't used internally; they're just there for completeness in case someone wants them. Also, added some code to make sure nothing in PromiseKit ever presumes to know what the default QoS or flags are.Dispatcher.dispatch()with a value-returning closure no longer requires a.promisenamespacer. It returns a Promise or Guarantee, as appropriate. There are tests to look for possible ambiguities, but it seems to work fine. (Of course, it doesn't work if the value is Void since that's the only thing that distinguishes actual dispatch requests from promise-creating shorthand.)The code now conforms to the existing PromiseKit logging/error reporting scheme. I moved stringification into the
LogErrorenum so that users can access it easily even if they write their own error handlers.Travis set to build any v7* branch rather than just "v7". You can drop this one commit if you don't want that part.