mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 02:16:09 -05:00
[V3] use uvloop if available (#1935)
* use uvloop if available * Update __main__.py requested changes made
This commit is contained in:
@@ -19,6 +19,15 @@ import logging.handlers
|
||||
import logging
|
||||
import os
|
||||
|
||||
# Let's not force this dependency, uvloop is much faster on cpython
|
||||
if sys.implementation.name == "cpython":
|
||||
try:
|
||||
import uvloop
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
|
||||
|
||||
#
|
||||
# Red - Discord Bot v3
|
||||
|
||||
Reference in New Issue
Block a user