mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[V3] use uvloop if available (#1935)
* use uvloop if available * Update __main__.py requested changes made
This commit is contained in:
parent
cf371e8093
commit
4b19421075
@ -19,6 +19,15 @@ import logging.handlers
|
|||||||
import logging
|
import logging
|
||||||
import os
|
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
|
# Red - Discord Bot v3
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user