about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorUltraQbik <no1skill@yandex.ru>2024-08-26 04:15:08 +0300
committerUltraQbik <no1skill@yandex.ru>2024-08-26 04:15:08 +0300
commit5ec59e4b5e2082fb52649893baa0cc0fd310f80b (patch)
treea6674033008d127a2d208f4ac81c3080d34697f2 /src
parentf58af3cb3a3e826d21fd521fe5a55b993d8a348e (diff)
downloadhttpy-5ec59e4b5e2082fb52649893baa0cc0fd310f80b.tar.gz
httpy-5ec59e4b5e2082fb52649893baa0cc0fd310f80b.zip
Add semaphore
Use semaphore to limit core usage slightly (maybe)

Also changed default configs a bit
Diffstat (limited to 'src')
-rw-r--r--src/config.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config.py b/src/config.py
index 18c136b..e72477e 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1,7 +1,8 @@
 # generic
 BUFFER_LENGTH = 65536           # 64 KiB
 BUFFER_MAX_SIZE = 2**30 * 0.5   # 512 MiB
-CLIENT_MAX_AMOUNT = 64
+CLIENT_MAX_AMOUNT = 512         # max requests at once, after which the connections are dropped
+CLIENT_MAX_PROCESS = 32         # max processing threads at once
 
 # API
 API_FILE_RANDOM_MIN_SIZE_LIMIT = 1              # 1 byte