# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT """ This module provides primitive operations to manage Python interpreters. The 'interpreters' module provides a more convenient interface. """ class ChannelClosedError(ChannelError): pass class ChannelEmptyError(ChannelError): pass class ChannelError(RuntimeError): pass class ChannelID(object): """ A channel ID identifies a channel and may be used as an int. """ end = property(None, None, None, """ 'send', 'recv', or 'both' """ ) recv = property(None, None, None, """ the 'recv' end of the channel """ ) send = property(None, None, None, """ the 'send' end of the channel """ ) pass class ChannelInfo(tuple): """ ChannelInfo A named tuple of a channel's state. """ closed = None closing = None count = None n_fields = 16 n_sequence_fields = 8 n_unnamed_fields = 0 num_interp_both = None num_interp_both_recv_released = None num_interp_both_released = None num_interp_both_send_released = None num_interp_recv = None num_interp_recv_released = None num_interp_send = None num_interp_send_released = None open = None recv_associated = None recv_released = None send_associated = None send_released = None class ChannelNotEmptyError(ChannelError): pass class ChannelNotFoundError(ChannelError): pass __doc__ = """This module provides primitive operations to manage Python interpreters. The 'interpreters' module provides a more convenient interface.""" __file__ = '/Users/Shared/build/ide/build-files/build-temp/runtimes-release/__os__/macos/runtime-python3.13/lib/Python.framework/Versions/3.13/lib/python3.13/lib-dynload/_interpchannels.cpython-313-darwin.so' __loader__ = None __name__ = '_interpchannels' __package__ = '' __spec__ = None def _channel_id(): pass def _register_end_types(): pass def close(): """ channel_close(cid, *, send=None, recv=None, force=False) Close the channel for all interpreters. If the channel is empty then the keyword args are ignored and both ends are immediately closed. Otherwise, if 'force' is True then all queued items are released and both ends are immediately closed. If the channel is not empty *and* 'force' is False then following happens: * recv is True (regardless of send): - raise ChannelNotEmptyError * recv is None and send is None: - raise ChannelNotEmptyError * send is True and recv is not True: - fully close the 'send' end - close the 'recv' end to interpreters not already receiving - fully close it once empty Closing an already closed channel results in a ChannelClosedError. Once the channel's ID has no more ref counts in any interpreter the channel will be destroyed. """ pass def create(unboundop): """ channel_create(unboundop) -> cid Create a new cross-interpreter channel and return a unique generated ID. """ return None def destroy(cid): """ channel_destroy(cid) Close and finalize the channel. Afterward attempts to use the channel will behave as though it never existed. """ pass def get_channel_defaults(cid): """ get_channel_defaults(cid) Return the channel's default values, set when it was created. """ pass def get_count(cid): """ get_count(cid) Return the number of items in the channel. """ pass def get_info(cid): """ get_info(cid) Return details about the channel. """ pass def list_all(): """ channel_list_all() -> [cid] Return the list of all IDs for active channels. """ return [None] def list_interpreters(cid, arg0, send): """ channel_list_interpreters(cid, *, send) -> [id] Return the list of all interpreter IDs associated with an end of the channel. The 'send' argument should be a boolean indicating whether to use the send or receive end. """ return [None] def recv(cid, default=None): """ channel_recv(cid, [default]) -> (obj, unboundop) Return a new object from the data at the front of the channel's queue. If there is nothing to receive then raise ChannelEmptyError, unless a default value is provided. In that case return it. """ return (None, None) def release(): """ channel_release(cid, *, send=None, recv=None, force=True) Close the channel for the current interpreter. 'send' and 'recv' (bool) may be used to indicate the ends to close. By default both ends are closed. Closing an already closed end is a noop. """ pass def send(): """ channel_send(cid, obj, *, blocking=True, timeout=None) Add the object's data to the channel's queue. By default this waits for the object to be received. """ pass def send_buffer(): """ channel_send_buffer(cid, obj, *, blocking=True, timeout=None) Add the object's buffer to the channel's queue. By default this waits for the object to be received. """ pass