MCPcopy Index your code
hub / github.com/python/cpython / send_nowait

Method send_nowait

Lib/test/support/channels.py:228–243  ·  view source on GitHub ↗

Send the object to the channel's receiving end. If the object is immediately received then return True (else False). Otherwise this is the same as send().

(self, obj, *,
                    unbounditems=None,
                    )

Source from the content-addressed store, hash-verified

226 _channels.send(self._id, obj, unboundop, timeout=timeout, blocking=True)
227
228 def send_nowait(self, obj, *,
229 unbounditems=None,
230 ):
231 """Send the object to the channel's receiving end.
232
233 If the object is immediately received then return True
234 (else False). Otherwise this is the same as send().
235 """
236 if unbounditems is None:
237 unboundop = -1
238 else:
239 unboundop, = _serialize_unbound(unbounditems)
240 # XXX Note that at the moment channel_send() only ever returns
241 # None. This should be fixed when channel_send_wait() is added.
242 # See bpo-32604 and gh-19829.
243 return _channels.send(self._id, obj, unboundop, blocking=False)
244
245 def send_buffer(self, obj, timeout=None, *,
246 unbounditems=None,

Calls 2

_serialize_unboundFunction · 0.70
sendMethod · 0.45