portal 3.1.2__tar.gz → 3.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {portal-3.1.2/portal.egg-info → portal-3.1.3}/PKG-INFO +1 -1
- {portal-3.1.2 → portal-3.1.3}/portal/__init__.py +1 -1
- {portal-3.1.2 → portal-3.1.3}/portal/client.py +2 -5
- {portal-3.1.2 → portal-3.1.3/portal.egg-info}/PKG-INFO +1 -1
- {portal-3.1.2 → portal-3.1.3}/LICENSE +0 -0
- {portal-3.1.2 → portal-3.1.3}/MANIFEST.in +0 -0
- {portal-3.1.2 → portal-3.1.3}/README.md +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/batching.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/buffers.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/client_socket.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/contextlib.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/packlib.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/poollib.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/process.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/server.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/server_socket.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/sharray.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/thread.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal/utils.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal.egg-info/SOURCES.txt +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal.egg-info/dependency_links.txt +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal.egg-info/requires.txt +0 -0
- {portal-3.1.2 → portal-3.1.3}/portal.egg-info/top_level.txt +0 -0
- {portal-3.1.2 → portal-3.1.3}/pyproject.toml +0 -0
- {portal-3.1.2 → portal-3.1.3}/requirements.txt +0 -0
- {portal-3.1.2 → portal-3.1.3}/setup.cfg +0 -0
- {portal-3.1.2 → portal-3.1.3}/setup.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_batching.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_client.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_errfile.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_pack.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_process.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_server.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_socket.py +0 -0
- {portal-3.1.2 → portal-3.1.3}/tests/test_thread.py +0 -0
@@ -47,7 +47,7 @@ class Client:
|
|
47
47
|
def stats(self):
|
48
48
|
now = time.time()
|
49
49
|
stats = {
|
50
|
-
'inflight': self.
|
50
|
+
'inflight': len(self.futures),
|
51
51
|
'numsend': self.sendrate[0],
|
52
52
|
'numrecv': self.recvrate[0],
|
53
53
|
'sendrate': self.sendrate[0] / (now - self.sendrate[1]),
|
@@ -65,7 +65,7 @@ class Client:
|
|
65
65
|
def call(self, method, *data):
|
66
66
|
reqnum = next(self.reqnum).to_bytes(8, 'little', signed=False)
|
67
67
|
start = time.time()
|
68
|
-
while self.
|
68
|
+
while len(self.futures) >= self.maxinflight:
|
69
69
|
with self.cond: self.cond.wait(timeout=0.2)
|
70
70
|
try:
|
71
71
|
self.socket.require_connection(timeout=0)
|
@@ -93,9 +93,6 @@ class Client:
|
|
93
93
|
self.futures.clear()
|
94
94
|
self.socket.close(timeout)
|
95
95
|
|
96
|
-
def _numinflight(self):
|
97
|
-
return len([x for x in self.futures.values() if not x.don])
|
98
|
-
|
99
96
|
def _recv(self, data):
|
100
97
|
assert len(data) >= 16, 'Unexpectedly short response'
|
101
98
|
reqnum = bytes(data[:8])
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|