Skip to content

Commit 05dfdf5

Browse files
author
Anselm Kruis
committed
Stackless issue python#217: C-API documentation update
Update the names of watchdog flags to match the implementation.
1 parent a0f56e7 commit 05dfdf5

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

Doc/c-api/stackless.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,17 +358,17 @@ Module :py:mod:`stackless`
358358
it will be awakened by other threads using channels which its
359359
blocked tasklets are waiting on.
360360
361-
``Py_WATCHDOG_SOFT``
361+
``PY_WATCHDOG_SOFT``
362362
Instead of interrupting a tasklet, we wait until the
363363
next tasklet scheduling moment to return. Always returns
364364
*Py_None*, as everything is in order.
365365
366-
``Py_WATCHDOG_IGNORE_NESTING``
366+
``PY_WATCHDOG_IGNORE_NESTING``
367367
Allows interrupts at all levels, effectively acting as
368368
though the *ignore_nesting* attribute were set on all
369369
tasklets.
370370
371-
``Py_WATCHDOG_TIMEOUT``
371+
``PY_WATCHDOG_TIMEOUT``
372372
Interprets *timeout* as a fixed run time, rather than a
373373
per-tasklet run limit. The function will then attempt to
374374
interrupt execution once this many total opcodes have

Include/stackless_api.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,18 +341,21 @@ PyAPI_FUNC(unsigned long) PyStackless_GetCurrentId(void);
341341
* When set enables the old thread-blocking behaviour when
342342
* we run out of tasklets on this thread and there are other
343343
* Python(r) threads running.
344-
* Py_WATCHDOG_SOFT:
344+
* PY_WATCHDOG_SOFT:
345345
* Instead of interrupting a tasklet, we wait until the
346346
* next tasklet scheduling moment to return. Always returns
347347
* Py_None, as everything is in order.
348-
* Py_WATCHDOG_IGNORE_NESTING:
348+
* PY_WATCHDOG_IGNORE_NESTING:
349349
* allows interrupts at all levels, effectively acting as
350350
* though the "ignore_nesting" attribute were set on all
351351
* tasklets.
352-
* Py_WATCHDOG_TIMEOUT:
352+
* PY_WATCHDOG_TIMEOUT:
353353
* interprets 'timeout' as a total timeout, rather than a
354354
* timeslice length. The function will then attempt to
355-
* interrupt execution
355+
* interrupt execution
356+
*
357+
* Note: the spelling is inconsistent (Py_ versus PY_) since ever.
358+
* We won't change it for compatibility reasons.
356359
*/
357360
#define Py_WATCHDOG_THREADBLOCK 1
358361
#define PY_WATCHDOG_SOFT 2

Stackless/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ What's New in Stackless 3.X.X?
99

1010
*Release date: 20XX-XX-XX*
1111

12+
- https://github.com/stackless-dev/stackless/issues/219
13+
C-API documentation update: update the names of watchdog flags to match the
14+
implementation.
15+
1216
- https://github.com/stackless-dev/stackless/issues/221
1317
Fix a bug that could cause an assertion failure and a reference leak during
1418
the termination of a main-tasklet, if an application embeds Stackless Python.

0 commit comments

Comments
 (0)