8.2.34 | Linux | www-data (uid:33)
👁 View: base_futures.py
📁 //snap/core18/3084/usr/lib/python3.6/asyncio/base_futures.py
__all__ = [] import concurrent.futures._base import reprlib from . import events Error = concurrent.futures._base.Error CancelledError = concurrent.futures.CancelledError TimeoutError = concurrent.futures.TimeoutError class InvalidStateError(Error): """The operation is not allowed in this state.""" # States for Future. _PENDING = 'PENDING' _CANCELLED = 'CANCELLED' _FINISHED = 'FINISHED' def isfuture(obj): """Check for a Future. This returns True when obj is a Future instance or is advertising itself as duck-type compatible by setting _asyncio_future_blocking. See comment in Future for more details. """ return (hasattr(obj.__class__, '_asyncio_future_blocking') and obj._asyncio_future_blocking is not None) def _format_callbacks(cb): """helper function for Future.__repr__""" size = len(cb) if not size: cb = '' def format_cb(callback): return events._format_callback_source(callback, ()) if size == 1: cb = format_cb(cb[0]) elif size == 2: cb = '{}, {}'.format(format_cb(cb[0]), format_cb(cb[1])) elif size > 2: cb = '{}, <{} more>, {}'.format(format_cb(cb[0]), size - 2, format_cb(cb[-1])) return 'cb=[%s]' % cb def _future_repr_info(future): # (Future) -> str """helper function for Future.__repr__""" info = [future._state.lower()] if future._state == _FINISHED: if future._exception is not None: info.append('exception={!r}'.format(future._exception)) else: # use reprlib to limit the length of the output, especially # for very long strings result = reprlib.repr(future._result) info.append('result={}'.format(result)) if future._callbacks: info.append(_format_callbacks(future._callbacks)) if future._source_traceback: frame = future._source_traceback[-1] info.append('created at %s:%s' % (frame[0], frame[1])) return info
← Back
💻 Terminal
📤 Upload
📂
Click or Drag & Drop
📁 //snap/core18/3084/usr/lib/python3.6/asyncio
NameSizePermModifiedActions
📁 __pycache__/-07552026-09-01 05:19🗑 Delete
__init__.py1.4K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
base_events.py56K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
base_futures.py2K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
base_subprocess.py8.9K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
base_tasks.py2.1K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
compat.py543B06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
constants.py371B06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
coroutines.py10.9K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
events.py23K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
futures.py15.5K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
locks.py15.2K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
log.py124B06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
proactor_events.py19.9K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
protocols.py4.4K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
queues.py7.8K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
selector_events.py40.7K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
sslproto.py25.4K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
streams.py23.9K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
subprocess.py7.4K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
tasks.py24.5K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
test_utils.py14.7K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
transports.py9.8K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
unix_events.py36.4K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
windows_events.py27.2K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
windows_utils.py6.7K06442026-03-03 11:10👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del