Skip to content

[SR-5706] DispatchTime.distantFuture does not compare with other values of DispatchTime #684

Closed
@glessard

Description

@glessard
Previous ID SR-5706
Radar rdar://problem/34132958
Original Reporter @glessard
Type Bug
Status Closed
Resolution Done
Environment

Ubuntu, 16.04.3, Swift 4.0 snapshot 2017-08-15

Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug
Assignee ktopley-apple (JIRA)
Priority Medium

md5: 181810e2de5e1fcdd610bb0159214367

Issue Description:

On Linux, DispatchTime.distantFuture does not fit in with the expected total ordering of DispatchTime values.

import Dispatch
let now = DispatchTime.now()
print(now == .distantFuture)
print(now > .distantFuture)
print(now < .distantFuture)

In any case, one expects one of these comparisons to be true.

On macOS, the output is (false, false, true).

On Linux, the output is (false, false, false).

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