Skip to content

Commit

Permalink
Update class.md (#4739)
Browse files Browse the repository at this point in the history
  • Loading branch information
kemingy authored and davidhewitt committed Dec 3, 2024
1 parent 824ba56 commit 42bd0e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guide/src/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ create_interface!(FloatClass, String);
#### Must be thread-safe

Python objects are freely shared between threads by the Python interpreter. This means that:
- Python objects may be created and destroyed by different Python threads; therefore #[pyclass]` objects must be `Send`.
- Python objects may be accessed by multiple python threads simultaneously; therefore `#[pyclass]` objects must be `Sync`.
- Python objects may be created and destroyed by different Python threads; therefore `#[pyclass]` objects must be `Send`.
- Python objects may be accessed by multiple Python threads simultaneously; therefore `#[pyclass]` objects must be `Sync`.

For now, don't worry about these requirements; simple classes will already be thread-safe. There is a [detailed discussion on thread-safety](./class/thread-safety.md) later in the guide.

Expand Down

0 comments on commit 42bd0e5

Please sign in to comment.