Content-Length: 285433 | pFad | http://github.com/python/cpython/pull/110246/commits/0c216ff82efb431bd17241b675c567d5239a3af7

00 gh-76785: Add SendChannel.send_buffer() by ericsnowcurrently · Pull Request #110246 · python/cpython · GitHub
Skip to content

gh-76785: Add SendChannel.send_buffer() #110246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Oct 9, 2023
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add SendChannel.send_buffer().
  • Loading branch information
ericsnowcurrently committed Oct 2, 2023
commit 0c216ff82efb431bd17241b675c567d5239a3af7
15 changes: 15 additions & 0 deletions Lib/test/support/interpreters.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ def send_nowait(self, obj):
# See bpo-32604 and gh-19829.
return _channels.send(self._id, obj)

def send_buffer(self, obj, timeout=None):
"""Send the object's buffer to the channel's receiving end.

This blocks until the object is received.
"""
_channels.send_buffer(self._id, obj, timeout=timeout)

def send_buffer_nowait(self, obj):
"""Send the object's buffer to the channel's receiving end.

If the object is immediately received then return True
(else False). Otherwise this is the same as send().
"""
return _channels.send_buffer(self._id, obj, blocking=False)

def close(self):
_channels.close(self._id, send=True)

Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/pull/110246/commits/0c216ff82efb431bd17241b675c567d5239a3af7

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy