Main: Remove uvloop/winloop from experimental status
Uvloop/Winloop does provide advantages to asyncio vs the standard Proactor loop, so remove experimental status. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
parent
0dcbb7a722
commit
30f02e5453
3 changed files with 8 additions and 24 deletions
20
main.py
20
main.py
|
|
@ -106,6 +106,14 @@ def entrypoint(arguments: Optional[dict] = None):
|
|||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
|
||||
if platform.system() == "Windows":
|
||||
from winloop import install
|
||||
else:
|
||||
from uvloop import install
|
||||
|
||||
# Set loop event policy
|
||||
install()
|
||||
|
||||
# Parse and override config from args
|
||||
if arguments is None:
|
||||
parser = init_argparser()
|
||||
|
|
@ -133,18 +141,6 @@ def entrypoint(arguments: Optional[dict] = None):
|
|||
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "backend:cudaMallocAsync"
|
||||
logger.warning("EXPERIMENTAL: Enabled the pytorch CUDA malloc backend.")
|
||||
|
||||
# Use Uvloop/Winloop
|
||||
if config.developer.uvloop:
|
||||
if platform.system() == "Windows":
|
||||
from winloop import install
|
||||
else:
|
||||
from uvloop import install
|
||||
|
||||
# Set loop event policy
|
||||
install()
|
||||
|
||||
logger.warning("EXPERIMENTAL: Running program with Uvloop/Winloop.")
|
||||
|
||||
# Set the process priority
|
||||
if config.developer.realtime_process_priority:
|
||||
import psutil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue