Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99dba27

Browse files
author
Skip Montanaro
committed
Bump default check interval to 100 instructions. Computers are much faster
than when this interval was first established. Checking too frequently just adds needless overhead because most of the time there is nothing to do and no other threads ready to run.
1 parent d581d77 commit 99dba27

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/ceval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ static int unpack_iterable(PyObject *, int, PyObject **);
469469

470470
/* for manipulating the thread switch and periodic "stuff" - used to be
471471
per thread, now just a pair o' globals */
472-
int _Py_CheckInterval = 10;
473-
volatile int _Py_Ticker = 10;
472+
int _Py_CheckInterval = 100;
473+
volatile int _Py_Ticker = 100;
474474

475475
PyObject *
476476
PyEval_EvalCode(PyCodeObject *co, PyObject *globals, PyObject *locals)

0 commit comments

Comments
 (0)