2021-12-23 21:17:33 +00:00
|
|
|
error[E0277]: `*mut pyo3::Python<'static>` cannot be shared between threads safely
|
2022-11-04 04:29:23 +00:00
|
|
|
--> tests/ui/not_send.rs:4:22
|
|
|
|
|
|
|
|
|
4 | py.allow_threads(|| { drop(py); });
|
|
|
|
| ------------- ^^^^^^^^^^^^^^^^ `*mut pyo3::Python<'static>` cannot be shared between threads safely
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
|
|
|
|
|
|
|
|
= help: within `pyo3::Python<'_>`, the trait `Sync` is not implemented for `*mut pyo3::Python<'static>`
|
2023-03-09 23:41:26 +00:00
|
|
|
= note: required because it appears within the type `PhantomData<*mut Python<'static>>`
|
|
|
|
= note: required because it appears within the type `NotSend`
|
2023-02-22 21:46:42 +00:00
|
|
|
= note: required because it appears within the type `(&EnsureGIL, NotSend)`
|
|
|
|
= note: required because it appears within the type `PhantomData<(&EnsureGIL, NotSend)>`
|
2023-03-09 23:41:26 +00:00
|
|
|
= note: required because it appears within the type `Python<'_>`
|
2022-11-04 04:29:23 +00:00
|
|
|
= note: required for `&pyo3::Python<'_>` to implement `Send`
|
2022-08-12 06:26:29 +00:00
|
|
|
note: required because it's used within this closure
|
2022-11-04 04:29:23 +00:00
|
|
|
--> tests/ui/not_send.rs:4:22
|
|
|
|
|
|
|
|
|
4 | py.allow_threads(|| { drop(py); });
|
|
|
|
| ^^
|
|
|
|
= note: required for `[closure@$DIR/tests/ui/not_send.rs:4:22: 4:24]` to implement `Ungil`
|
2022-01-13 21:25:23 +00:00
|
|
|
note: required by a bound in `pyo3::Python::<'py>::allow_threads`
|
2022-11-04 04:29:23 +00:00
|
|
|
--> src/marker.rs
|
|
|
|
|
|
|
|
|
| F: Ungil + FnOnce() -> T,
|
2023-03-09 23:41:26 +00:00
|
|
|
| ^^^^^ required by this bound in `Python::<'py>::allow_threads`
|