Skip to content

[SR-9330] DispatchSourceTimer schedule methods should document the default values #631

Open
@lilyball

Description

@lilyball
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions