Skip to content

Final cleanup for Dispatcher conversion#1016

Merged
mxcl merged 11 commits intomxcl:v7from
GarthSnyder:v7-finalize
Feb 28, 2019
Merged

Final cleanup for Dispatcher conversion#1016
mxcl merged 11 commits intomxcl:v7from
GarthSnyder:v7-finalize

Conversation

@GarthSnyder
Copy link
Collaborator

This should be ready to go. Main changes:

  • Adds documentation. It seemed best to keep most existing docs and examples in terms of conf.Q and DispatchQueue since 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 the Appendix that describes Dispatcher in a bit more detail. There are a few other incidental doc changes as well, mostly about versioning.

  • Inline documentation groomed and tested.

  • DispatchQueueDispatcher can now accommodate a DispatchGroup and 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 .promise namespacer. 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 LogError enum 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.

@mxcl mxcl merged commit e0decf3 into mxcl:v7 Feb 28, 2019
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 {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants