Skip to content

Commit 669e77d

Browse files
author
Anselm Kruis
committed
Stackless issue python#217: C-API documentation update
Update the names of watchdog flags to match the implementation. (cherry picked from commit 05dfdf5)
1 parent 39983ac commit 669e77d

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
@@ -327,17 +327,17 @@ stackless module
327327
it will be awakened by other threads using channels which its
328328
blocked tasklets are waiting on.
329329
330-
``Py_WATCHDOG_SOFT``
330+
``PY_WATCHDOG_SOFT``
331331
Instead of interrupting a tasklet, we wait until the
332332
next tasklet scheduling moment to return. Always returns
333333
*Py_None*, as everything is in order.
334334
335-
``Py_WATCHDOG_IGNORE_NESTING``
335+
``PY_WATCHDOG_IGNORE_NESTING``
336336
Allows interrupts at all levels, effectively acting as
337337
though the *ignore_nesting* attribute were set on all
338338
tasklets.
339339
340-
``Py_WATCHDOG_TIMEOUT``
340+
``PY_WATCHDOG_TIMEOUT``
341341
Interprets *timeout* as a fixed run time, rather than a
342342
per-tasklet run limit. The function will then attempt to
343343
interrupt execution once this many total opcodes have

Stackless/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ What's New in Stackless 2.7.XX?
1010

1111
*Release date: XXXX-XX-XX*
1212

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

Stackless/stackless_api.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,18 +334,21 @@ PyAPI_FUNC(long) PyStackless_GetCurrentId(void);
334334
* When set enables the old thread-blocking behaviour when
335335
* we run out of tasklets on this thread and there are other
336336
* Python(r) threads running.
337-
* Py_WATCHDOG_SOFT:
337+
* PY_WATCHDOG_SOFT:
338338
* Instead of interrupting a tasklet, we wait until the
339339
* next tasklet scheduling moment to return. Always returns
340340
* Py_None, as everything is in order.
341-
* Py_WATCHDOG_IGNORE_NESTING:
341+
* PY_WATCHDOG_IGNORE_NESTING:
342342
* allows interrupts at all levels, effectively acting as
343343
* though the "ignore_nesting" attribute were set on all
344344
* tasklets.
345-
* Py_WATCHDOG_TIMEOUT:
345+
* PY_WATCHDOG_TIMEOUT:
346346
* interprets 'timeout' as a total timeout, rather than a
347347
* timeslice length. The function will then attempt to
348-
* interrupt execution
348+
* interrupt execution
349+
*
350+
* Note: the spelling is inconsistent (Py_ versus PY_) since ever.
351+
* We won't change it for compatibility reasons.
349352
*/
350353
#define Py_WATCHDOG_THREADBLOCK 1
351354
#define PY_WATCHDOG_SOFT 2

0 commit comments

Comments
 (0)