Skip to content

Commit edec8aa

Browse files
authored
Update README.md
1 parent a20ffee commit edec8aa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Python's built-in `list`, `dict`, and `deque` are thread-safe for some operation
1010

1111
## Why use these collections?
1212

13-
**_There is a lot of confusion on whether Python collections are thread-safe or not_**<sup>1, 2, 3</sup>. Spoiler: they aren't, despite what many people believe.
13+
**_There is a lot of confusion on whether Python collections are thread-safe or not_**<sup>1, 2, 3</sup>.
1414

1515
The bottom line is that Python's built-in collections are **not fully thread-safe** for all operations. While some simple operations (like `list.append()` or `dict[key] = value`) are thread-safe due to the Global Interpreter Lock (GIL), **compound operations and iteration with mutation are not**. This can lead to subtle bugs, race conditions, or even crashes in multi-threaded programs.
1616

0 commit comments

Comments
 (0)