Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Nov 17, 2024
1 parent 60a9800 commit 180e3ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cysignals/tests.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1290,11 +1290,12 @@ def test_thread_sig_block(long delay=DEFAULT_DELAY):
sig_off()


cdef void* func_thread_sig_block(void* ignored) noexcept nogil:
cdef void* func_thread_sig_block(void* ignored) noexcept with gil:
# This is executed by the two threads spawned by test_thread_sig_block()
cdef int n
for n in range(1000000):
sig_block()
if not (1 <= cysigs.block_sigint <= 2):
PyErr_SetString(RuntimeError, "sig_block() is not thread-safe")
sig_error()
sig_unblock()

0 comments on commit 180e3ac

Please sign in to comment.