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 Nov 28, 2024
1 parent b308ffa commit 188f1d6
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 188f1d6

Please sign in to comment.