Skip to content

Give a better diagnostic if user does trio.to_thread.run_sync(async_fn) #1573

@njsmith

Description

@njsmith

#1513 fixed the trio.from_thread functions to give nice diagnostics here, but skipped trio.to_thread.

Here's a real user who got confused by this: https://gitter.im/python-trio/general?at=5ed860e2b101510b203789ef

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions