Skip to content

Commit 266c20e

Browse files
committed
wip
1 parent 280c9ca commit 266c20e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cadence/workflow/deterministic_event_loop.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
from asyncio import AbstractEventLoop, futures, tasks
1+
from asyncio import AbstractEventLoop, Handle, futures, tasks
22
from asyncio import Future
3+
from contextvars import Context
34
import logging
45
import collections
56
import asyncio.events as events
67
import threading
8+
from typing import Callable
79

810
logger = logging.getLogger(__name__)
911

@@ -23,7 +25,7 @@ def __init__(self):
2325
self._stopping = False
2426
self._closed = False
2527

26-
def call_soon(self, callback, *args, context=None):
28+
def call_soon(self, callback: Callable, *args, context : Context | None = None) -> Handle:
2729
self._call_soon(callback, args, context)
2830

2931
def _call_soon(self, callback, args, context):

0 commit comments

Comments
 (0)