swiftlang / swiftlang/swift-corelibs-libdispatch

[SR-2207] DispatchQoS.init(qosClass: DispatchQoS.QoSClass, relativePriority: Int) should have a default relative priority

Open
#729 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Improvement libdispatch
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.