MCPcopy Index your code
hub / github.com/RustPython/RustPython / recv_nowait

Method recv_nowait

Lib/test/support/channels.py:161–175  ·  view source on GitHub ↗

Return the next object from the channel. If none have been sent then return the default if one is provided or fail with ChannelEmptyError. Otherwise this is the same as recv().

(self, default=_NOT_SET)

Source from the content-addressed store, hash-verified

159 return obj
160
161 def recv_nowait(self, default=_NOT_SET):
162 """Return the next object from the channel.
163
164 If none have been sent then return the default if one
165 is provided or fail with ChannelEmptyError. Otherwise this
166 is the same as recv().
167 """
168 if default is _NOT_SET:
169 obj, unboundop = _channels.recv(self._id)
170 else:
171 obj, unboundop = _channels.recv(self._id, default)
172 if unboundop is not None:
173 assert obj is None, repr(obj)
174 return _resolve_unbound(unboundop)
175 return obj
176
177 def close(self):
178 _channels.close(self._id, recv=True)

Callers 1

Calls 3

reprFunction · 0.85
_resolve_unboundFunction · 0.85
recvMethod · 0.45

Tested by 1