-
Notifications
You must be signed in to change notification settings - Fork 792
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ariel Ben-Yehuda
committed
Jan 27, 2025
1 parent
cb81581
commit abf1395
Showing
3 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from pyo3_pytests import misc | ||
|
||
|
||
def make_loop(): | ||
# create a reference loop that will only be destroyed when the GC is called at the end | ||
# of execution | ||
start = [] | ||
cur = [start] | ||
for _ in range(1000 * 1000 * 10): | ||
cur = [cur] | ||
start.append(cur) | ||
return start | ||
|
||
|
||
# set a bomb that will explode when modules are cleaned up | ||
loopy = [make_loop()] | ||
|
||
|
||
def test_hammer_gil(): | ||
loopy.append(misc.hammer_gil_in_thread()) |