portal 3.4.2__tar.gz → 3.4.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.4.2/portal.egg-info → portal-3.4.3}/PKG-INFO +1 -1
- {portal-3.4.2 → portal-3.4.3}/portal/__init__.py +1 -1
- {portal-3.4.2 → portal-3.4.3}/portal/client_socket.py +4 -0
- {portal-3.4.2 → portal-3.4.3}/portal/server_socket.py +4 -0
- {portal-3.4.2 → portal-3.4.3/portal.egg-info}/PKG-INFO +1 -1
- {portal-3.4.2 → portal-3.4.3}/LICENSE +0 -0
- {portal-3.4.2 → portal-3.4.3}/MANIFEST.in +0 -0
- {portal-3.4.2 → portal-3.4.3}/README.md +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/batching.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/buffers.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/client.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/contextlib.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/packlib.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/poollib.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/process.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/server.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/sharray.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/thread.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal/utils.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal.egg-info/SOURCES.txt +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal.egg-info/dependency_links.txt +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal.egg-info/requires.txt +0 -0
- {portal-3.4.2 → portal-3.4.3}/portal.egg-info/top_level.txt +0 -0
- {portal-3.4.2 → portal-3.4.3}/pyproject.toml +0 -0
- {portal-3.4.2 → portal-3.4.3}/requirements.txt +0 -0
- {portal-3.4.2 → portal-3.4.3}/setup.cfg +0 -0
- {portal-3.4.2 → portal-3.4.3}/setup.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_batching.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_client.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_errfile.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_pack.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_process.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_server.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_socket.py +0 -0
- {portal-3.4.2 → portal-3.4.3}/tests/test_thread.py +0 -0
@@ -30,6 +30,7 @@ class Options:
|
|
30
30
|
logging: bool = True
|
31
31
|
logging_color: str = 'yellow'
|
32
32
|
connect_wait: float = 0.1
|
33
|
+
loop_sleep: float = 0.0
|
33
34
|
|
34
35
|
|
35
36
|
class ClientSocket:
|
@@ -175,6 +176,9 @@ class ClientSocket:
|
|
175
176
|
[x() for x in self.callbacks_disc]
|
176
177
|
continue
|
177
178
|
|
179
|
+
if self.options.loop_sleep:
|
180
|
+
time.sleep(self.options.loop_sleep)
|
181
|
+
|
178
182
|
if sock:
|
179
183
|
sock.close()
|
180
184
|
|
@@ -3,6 +3,7 @@ import dataclasses
|
|
3
3
|
import queue
|
4
4
|
import selectors
|
5
5
|
import socket
|
6
|
+
import time
|
6
7
|
|
7
8
|
from . import buffers
|
8
9
|
from . import contextlib
|
@@ -31,6 +32,7 @@ class Options:
|
|
31
32
|
max_send_queue: int = 4096
|
32
33
|
logging: bool = True
|
33
34
|
logging_color: str = 'blue'
|
35
|
+
loop_sleep: float = 0.0
|
34
36
|
|
35
37
|
|
36
38
|
class ServerSocket:
|
@@ -127,6 +129,8 @@ class ServerSocket:
|
|
127
129
|
# The client is gone but we may have buffered messages left to
|
128
130
|
# read, so we keep the socket open until recv() fails.
|
129
131
|
pass
|
132
|
+
if self.options.loop_sleep:
|
133
|
+
time.sleep(self.options.loop_sleep)
|
130
134
|
except Exception as e:
|
131
135
|
self.error = e
|
132
136
|
|
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
|