mirror of https://github.com/MagicStack/uvloop.git
bench.readline: Make uvloop dep optional
This commit is contained in:
parent
fafcc7ffcd
commit
89f3f1e132
|
@ -1,7 +1,6 @@
|
|||
import argparse
|
||||
import asyncio
|
||||
import gc
|
||||
import uvloop
|
||||
import os.path
|
||||
import socket as socket_module
|
||||
|
||||
|
@ -44,6 +43,7 @@ if __name__ == '__main__':
|
|||
args = parser.parse_args()
|
||||
|
||||
if args.uvloop:
|
||||
import uvloop
|
||||
loop = uvloop.new_event_loop()
|
||||
print('using UVLoop')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue