mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-26 15:44:34 +02:00
Drop Python 3.4 and switch to async / await syntax for asyncio. Fixes #1425
This commit is contained in:
1 parent
8baa480b79
commit
76af98404a
119 files changed
+2432
-3084
No files matched your search
@@ -85,10 +85,9 @@ def test_lock_decorator(loop):
|
||||
self._test_val = 0
|
||||
|
||||
@locking
|
||||
@asyncio.coroutine
|
||||
def method_to_lock(self):
|
||||
async def method_to_lock(self):
|
||||
res = self._test_val
|
||||
yield from asyncio.sleep(0.1)
|
||||
await asyncio.sleep(0.1)
|
||||
self._test_val += 1
|
||||
return res
|
||||
|
||||
|
||||
Reference in new issue
Block a user