# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT """ Accelerator module for asyncio """ class Future(object): """ This class is *almost* compatible with concurrent.futures.Future. Differences: - result() and exception() do not take a timeout argument and raise an exception when the future isn't done yet. - Callbacks registered with add_done_callback() are always called via the event loop's call_soon_threadsafe(). - This class is not compatible with the wait() and as_completed() methods in the concurrent.futures package. """ def __init__(self, *args, **kwargs): pass _asyncio_future_blocking = property(None, None, None, ) _callbacks = property(None, None, None, ) _cancel_message = property(None, None, None, ) _exception = property(None, None, None, ) _log_traceback = property(None, None, None, ) _loop = property(None, None, None, ) def _make_cancelled_error(self): """ Create the CancelledError to raise if the Future is cancelled. This should only be called once when handling a cancellation since it erases the context exception value. """ pass def _repr_info(self): pass _result = property(None, None, None, ) _source_traceback = property(None, None, None, ) _state = property(None, None, None, ) def add_done_callback(self): """ Add a callback to be run when the future becomes done. The callback is called with a single argument - the future object. If the future is already done when this is called, the callback is scheduled with call_soon. """ pass def cancel(self, msg=None): """ Cancel the future and schedule callbacks. If the future is already done or cancelled, return False. Otherwise, change the future's state to cancelled, schedule the callbacks and return True. """ pass def cancelled(self): """ Return True if the future was cancelled. """ pass def done(self): """ Return True if the future is done. Done means either that a result / exception are available, or that the future was cancelled. """ pass def exception(self): """ Return the exception that was set on this future. The exception (or None if no exception was set) is returned only if the future is done. If the future has been cancelled, raises CancelledError. If the future isn't done yet, raises InvalidStateError. """ pass def get_loop(self): """ Return the event loop the Future is bound to. """ pass def remove_done_callback(self, fn): """ Remove all instances of a callback from the "call when done" list. Returns the number of callbacks removed. """ pass def result(self): """ Return the result this future represents. If the future has been cancelled, raises CancelledError. If the future's result isn't yet available, raises InvalidStateError. If the future is done and has an exception set, this exception is raised. """ pass def set_exception(self, exception): """ Mark the future done and set an exception. If the future is already done when this method is called, raises InvalidStateError. """ pass def set_result(self, result): """ Mark the future done and set its result. If the future is already done when this method is called, raises InvalidStateError. """ pass class Task(Future): """ A coroutine wrapped in a Future. """ def __init__(self, *args, **kwargs): pass _asyncio_future_blocking = property(None, None, None, ) _callbacks = property(None, None, None, ) _cancel_message = property(None, None, None, ) _coro = property(None, None, None, ) _exception = property(None, None, None, ) _fut_waiter = property(None, None, None, ) _log_destroy_pending = property(None, None, None, ) _log_traceback = property(None, None, None, ) _loop = property(None, None, None, ) def _make_cancelled_error(self): """ Create the CancelledError to raise if the Task is cancelled. This should only be called once when handling a cancellation since it erases the context exception value. """ pass _must_cancel = property(None, None, None, ) def _repr_info(self): pass _result = property(None, None, None, ) _source_traceback = property(None, None, None, ) _state = property(None, None, None, ) def add_done_callback(self): """ Add a callback to be run when the future becomes done. The callback is called with a single argument - the future object. If the future is already done when this is called, the callback is scheduled with call_soon. """ pass def cancel(self, msg=None): """ Request that this task cancel itself. This arranges for a CancelledError to be thrown into the wrapped coroutine on the next cycle through the event loop. The coroutine then has a chance to clean up or even deny the request using try/except/finally. Unlike Future.cancel, this does not guarantee that the task will be cancelled: the exception might be caught and acted upon, delaying cancellation of the task or preventing cancellation completely. The task may also return a value or raise a different exception. Immediately after this method is called, Task.cancelled() will not return True (unless the task was already cancelled). A task will be marked as cancelled when the wrapped coroutine terminates with a CancelledError exception (even if cancel() was not called). """ pass def cancelled(self): """ Return True if the future was cancelled. """ pass def done(self): """ Return True if the future is done. Done means either that a result / exception are available, or that the future was cancelled. """ pass def exception(self): """ Return the exception that was set on this future. The exception (or None if no exception was set) is returned only if the future is done. If the future has been cancelled, raises CancelledError. If the future isn't done yet, raises InvalidStateError. """ pass def get_coro(self): pass def get_name(self): pass def get_stack(self, limit=None): """ Return the list of stack frames for this task's coroutine. If the coroutine is not done, this returns the stack where it is suspended. If the coroutine has completed successfully or was cancelled, this returns an empty list. If the coroutine was terminated by an exception, this returns the list of traceback frames. The frames are always ordered from oldest to newest. The optional limit gives the maximum number of frames to return; by default all available frames are returned. Its meaning differs depending on whether a stack or a traceback is returned: the newest frames of a stack are returned, but the oldest frames of a traceback are returned. (This matches the behavior of the traceback module.) For reasons beyond our control, only one stack frame is returned for a suspended coroutine. """ pass def print_stack(self, limit=None, file=None): """ Print the stack or traceback for this task's coroutine. This produces output similar to that of the traceback module, for the frames retrieved by get_stack(). The limit argument is passed to get_stack(). The file argument is an I/O stream to which the output is written; by default output is written to sys.stderr. """ pass def remove_done_callback(self, fn): """ Remove all instances of a callback from the "call when done" list. Returns the number of callbacks removed. """ pass def result(self): """ Return the result this future represents. If the future has been cancelled, raises CancelledError. If the future's result isn't yet available, raises InvalidStateError. If the future is done and has an exception set, this exception is raised. """ pass def set_exception(self, exception): pass def set_name(self, value): pass def set_result(self, result): pass __doc__ = 'Accelerator module for asyncio' __file__ = '/Users/Shared/src/ide/build-files/build-temp/runtimes-release/__os__/osx/runtime-python3.9/lib/Python.framework/Versions/Current/lib/python3.9/lib-dynload/_asyncio.cpython-39-darwin.so' __loader__ = None __name__ = '_asyncio' __package__ = '' __spec__ = None _all_tasks = None _current_tasks = {} def _enter_task(loop, task): """ Enter into task execution or resume suspended task. Task belongs to loop. Returns None. """ pass def _get_running_loop(): """ Return the running event loop or None. This is a low-level function intended to be used by event loops. This function is thread-specific. """ pass def _leave_task(loop, task): """ Leave task execution or suspend a task. Task belongs to loop. Returns None. """ pass def _register_task(task): """ Register a new task in asyncio as executed by loop. Returns None. """ pass def _set_running_loop(loop): """ Set the running event loop. This is a low-level function intended to be used by event loops. This function is thread-specific. """ pass def _unregister_task(task): """ Unregister a task. Returns None. """ pass def get_event_loop(arg0): """ Return an asyncio event loop. When called from a coroutine or a callback (e.g. scheduled with call_soon or similar API), this function will always return the running event loop. If there is no running event loop set, the function will return the result of `get_event_loop_policy().get_event_loop()` call. """ pass def get_running_loop(): """ Return the running event loop. Raise a RuntimeError if there is none. This function is thread-specific. """ pass