summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-06-19 17:27:31 +1000
committerDamien George <damien@micropython.org>2024-06-20 00:11:05 +1000
commit8ac9c8f392000febb6ca58c470b653589dd7c710 (patch)
tree3b8145e3048e66da0b1aa670dd7b43542b19820d /py
parente9c898cb3312c2e2cf9e0da1d099541bf7bdf4d2 (diff)
downloadmicropython-8ac9c8f392000febb6ca58c470b653589dd7c710.tar.gz
micropython-8ac9c8f392000febb6ca58c470b653589dd7c710.zip
extmod/modasyncio: Add support for a callback on TaskQueue push.
Allows passing in a callback to `TaskQueue()` that is called when something is pushed on to the queue. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 61cfe96da8..2cbf5b88ef 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -1610,6 +1610,10 @@ typedef double mp_float_t;
#define MICROPY_PY_ASYNCIO (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES)
#endif
+#ifndef MICROPY_PY_ASYNCIO_TASK_QUEUE_PUSH_CALLBACK
+#define MICROPY_PY_ASYNCIO_TASK_QUEUE_PUSH_CALLBACK (0)
+#endif
+
#ifndef MICROPY_PY_UCTYPES
#define MICROPY_PY_UCTYPES (MICROPY_CONFIG_ROM_LEVEL_AT_LEAST_EXTRA_FEATURES)
#endif