This trait is implemented for #[pyclass]
and handles following two situations:
- In case
T
is Send
, stub ThreadChecker
is used and does nothing.
This implementation is used by default. Compile fails if T: !Send
.
- In case
T
is !Send
, ThreadChecker
panics when T
is accessed by another thread.
This implementation is used when #[pyclass(unsendable)]
is given.
Panicking makes it safe to expose T: !Send
to the Python interpreter, where all objects
can be accessed by multiple threads by threading
module.
impl PyClassSend for BlockerResult
| |
impl PyClassSend for FilterSet
| |
impl PyClassSend for UrlSpecificResources
| |
impl PyClassSend for Engine
| |