##// END OF EJS Templates
Add setting to disable venv warning (#13706)...
Add setting to disable venv warning (#13706) * Add setting to disable venv warning * Fix style * Add what's new entry * Improve help text * Use double quotes Co-authored-by: Blazej Michalik <6691643+MrMino@users.noreply.github.com> * Add missing comma Co-authored-by: Blazej Michalik <6691643+MrMino@users.noreply.github.com>

File last commit:

r16114:15cc5a8e
r27697:66aeb3fc master
Show More
hb_gil.py
31 lines | 574 B | text/x-python | PythonLexer
"""
Run this script in the qtconsole with one of:
%load hb_gil.py
or
%run hb_gil.py
Holding the GIL for too long could disrupt the heartbeat.
See Issue #1260: https://github.com/ipython/ipython/issues/1260
"""
import sys
import time
from cython import inline
def gilsleep(t):
"""gil-holding sleep with cython.inline"""
code = '\n'.join([
'from posix cimport unistd',
'unistd.sleep(t)',
])
while True:
inline(code, quiet=True, t=t)
print(time.time())
sys.stdout.flush() # this is important
gilsleep(5)