Skip to content

Thread.current is unnecessarily noasync #5139

Open
@weissi

Description

@weissi

Thread.current is very useful as a debugging mechanism to understand the ordering of code running concurrently and/or in parallel. This is very useful to use from async functions.

Sure, the workaround is just

extension Thread {
    public static var currentThread: Thread {
        return Thread.current
    }
}

but that shouldn't be necessary.

Metadata

Metadata

Assignees

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