diff --git a/guide/src/free-threading.md b/guide/src/free-threading.md index 7f43f265490..77b2ff327a2 100644 --- a/guide/src/free-threading.md +++ b/guide/src/free-threading.md @@ -100,7 +100,7 @@ The most straightforward way to trigger this problem to use the Python `pyclass`. For example, consider the following `PyClass` implementation: ``` -# use python::prelude::*; +# use pyo3::prelude::*; # fn main() { #[pyclass] #[derive(Default)] @@ -119,12 +119,13 @@ impl ThreadIter { self.count += 1; self.count } +} # } ``` And then if we do something like this in Python: -``` +```python import concurrent.futures from my_module import ThreadIter @@ -140,7 +141,7 @@ with concurrent.futures.ThreadPoolExecutor(max_workers=16) as tpe: We will see an exception: -``` +```text Traceback (most recent call last) File "example.py", line 5, in next(i) diff --git a/src/lib.rs b/src/lib.rs index 7de32ca264f..247b42ac372 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -501,6 +501,7 @@ pub mod doc_test { "guide/src/exception.md" => guide_exception_md, "guide/src/faq.md" => guide_faq_md, "guide/src/features.md" => guide_features_md, + "guide/src/free-threading.md" => guide_free_threading_md, "guide/src/function.md" => guide_function_md, "guide/src/function/error-handling.md" => guide_function_error_handling_md, "guide/src/function/signature.md" => guide_function_signature_md,