swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-9330] DispatchSourceTimer schedule methods should document the default values
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-9330 |
| Radar | None |
| Original Reporter | @lilyball |
| Type | Bug |
Environment
Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.2.0
Additional Detail from JIRA
| Votes | 0 |
| Component/s | libdispatch |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: 546cc724bb4b9cdcd1d433f0fec20a84
Issue Description:
The DispatchSourceTimer suite of schedule methods all have documentation comments, but the documentation comments don't explain what the default values for parameters are. So for example, the schedule(deadline:repeating:leeway🙂 method does not make it clear whether omitting the repeating: argument will produce a oneshot timer or not. Of course, in this instance if it produced a repeating timer there's no obvious value for what the repeating interval would be, but still, any time I use this method I always have to double-check what the default value is in the source in order to satisfy myself that I really am producing a oneshot timer.
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
Start by locating the DispatchSourceTimer schedule methods and reading their existing documentation comments in the libdispatch sources. Document the default values for the schedule parameters, including whether omitting repeating creates a one-shot timer, and verify that all schedule methods describe their defaults consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, swift
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100