Interface PythonEventLoop
- All Known Implementing Classes:
NettyPythonEventLoop
Event-loop operations required to drive Micronaut-managed Python asyncio tasks.
-
Method Summary
Modifier and TypeMethodDescriptionvoidQueue a callback for serialized execution on the loop.booleanUsed to decide whether Python work can run immediately or must be queued.Queue a callback after the requested delay using loop time.doubletime()Returns the monotonic time base exposed to Python's asyncio APIs.
-
Method Details
-
inEventLoop
boolean inEventLoop()Used to decide whether Python work can run immediately or must be queued.- Returns:
- Whether the current thread is this event-loop thread.
-
execute
Queue a callback for serialized execution on the loop.- Parameters:
runnable- The callback.
-
schedule
Queue a callback after the requested delay using loop time.- Parameters:
runnable- The callback.delay- The delay.unit- The delay unit.- Returns:
- The scheduled future.
-
time
double time()Returns the monotonic time base exposed to Python's asyncio APIs.- Returns:
- Event-loop time in seconds.
-