apple/swift-corelibs-libdispatch

`DispatchTimeInterval` is not `Sendable`

NachoSoto opened this issue · 4 comments

Description
For example:

Non-sendable type 'DispatchTimeInterval' passed in implicitly asynchronous call to main actor-isolated function cannot cross actor boundary

Is there a reason why DispatchTimeInterval shouldn't be marked as Sendable? It's an immutable value type.

Environment

  • Swift compiler version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100)
  • Xcode version: Xcode 14.3 (14E222b)
ktoso commented

Hi there, thanks for reporting, that's definitely something to be addressed.

Generally dispatch is not governed "by Swift" so this isn't the right place to report but I'll reach out and see what we can do.

At the same time, we'll need to do the change for corelibs dispatch for non apple platforms over here: https://github.com/apple/swift-corelibs-libdispatch/blob/main/src/swift/Time.swift

ktoso commented

Actually, maybe best to move this issue to corelibs-dispatch, allow me to do that.

ktoso commented

Tagging @PriyaAvhad who has looked into this

ktoso commented

This has been merged to main and 5.9 👍