Comments (6)
Sorry for delay.
I'll take a look this weekend.
from aiozmq.
Not a problem at all. You're really doing a great job with this lib!
from aiozmq.
Please explain me why do you need to wait for transport's write buffer flush?
Looks like you are seeking for pause_writing/resume_writing pair.
I'we implemented it in stream
branch as part of creating ZmqStream
class for giving more human interface that transports/protocols.
The code is almost ready for merging but I need to make several tests for 100% coverage.
I've postponed my work on streams for sake of other my projects but can force development if the stream branch is that you needed.
from aiozmq.
I run a task with run_until_complete, which issues some writes. The task is done after the last write, so the event loop stops running and and some messages don't get written, as the write callback can't happen when the loops stops. As the loop gets other tasks to run later, I don't want to call close() and wait for connection_lost(), but still I want all buffers flushed before the task is done and the loop suspended.
from aiozmq.
Aaah, understood.
Sorry, I don't want to do anything to fix your particular requirement.
The reason is: ZmqTransport has modeled after asyncio ones.
Neither of asyncio transports: TCP, UDP, SSL, Unix, pipe -- doesn't have any user callback to signal that data has been moved from python buffer to OS one. In the most cases (regular usage with run_forever or for client sockets) that doesn't make sense.
Twisted's protocols has no such callback also.
I'll add the callback only after asyncio will do it.
Good news for you: probably you don't need for callback at all.
ZeroMQ executes separate IO thread for writing and has reasonable big default buffer sizes.
If your ZMQ socket counterpart consumes ZMQ messages quickly enough you simply never get situation when ZmqTrasport will need to use own buffer.
from aiozmq.
ok. thank you anyway. perhaps I raise the issue for asyncio
from aiozmq.
Related Issues (20)
- Allow custom packer for rpc HOT 1
- it seems that readme file needs updating HOT 1
- update docs link in the project description HOT 1
- Receiver end stops receiving
- zmq_events_test.py:ZmqLooplessTests.test_req_rep hangs
- example of aiozmq.rpc with PyQt5
- Process hangs with 100% CPU after several weeks uptime HOT 2
- why the Publish-Subscribe can't run?
- Switch CI to GitHub Actions
- Prepare 1.0 release HOT 6
- Support Python 3.10 HOT 4
- Interest in man pages? HOT 2
- asyncio.CancelledError should be caught in "try_log" HOT 1
- Python 3.10: wait_for() got an unexpected keyword argument 'loop' HOT 1
- New release for python 3.11 HOT 2
- Can't run tests on python 3.11 HOT 2
- Project's README is misleading about pyzmq.
- Strange behaviour (or me not properly understanding asyncio and aiozmq) - Code only sends when publish more than once HOT 1
- ROUTER-ROUTER can't send msg HOT 1
- How to flush a transmit buffer?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiozmq.