Skip to content

Different examples are used in Replacing @Sendable with sending section #147

@stzn

Description

@stzn

In Replacing @Sendable with sending section,the following example is provided:

-public func takeValue(_: @Sendable @escaping () -> Void)
+public func takeValue(_: sending @escaping () -> Void)

However, in the example under the "To resolve" part, the code is shown as:

public func takeValue(_: __shared sending NotSendable)

It seems clearer and more consistent to use the same example:

public func takeValue(_: __shared sending @escaping () -> Void)

Is there a specific reason for the change in the example?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions