swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-2207] DispatchQoS.init(qosClass: DispatchQoS.QoSClass, relativePriority: Int) should have a default relative priority
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
| Previous ID | SR-2207 |
| Radar | None |
| Original Reporter | @glessard |
| Type | Improvement |
Environment
Xcode 8 beta 3
Additional Detail from JIRA
| Votes | 0 |
| Component/s | libdispatch |
| Labels | Improvement |
| Assignee | mww (JIRA) |
| Priority | Medium |
md5: 0a7258f71072fa80ec0950f50cd68e37
Issue Description:
The rest of the new Dispatch overlay makes good use of defaults, but this parameter was passed over somehow. It would make sense to have a default of 0, that surely is the most commonly-passed parameter.
public struct DispatchQoS : Equatable {
public init(qosClass: QoSClass, relativePriority: Int = 0) {
self.qosClass = qosClass
self.relativePriority = relativePriority
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Swift overlay declaration for DispatchQoS.init(qosClass:relativePriority:) and compare it with the issue's example. The work is done when relativePriority defaults to 0 while callers that provide an explicit value continue to work; no file or test path is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100