Commit cd62991f authored by Tom Niget's avatar Tom Niget

Fix get for Future

parent 220d7ccb
Subproject commit 9c9a3751d7fd768a56f80e371f99d51af6faa53c
Subproject commit 76287636438cf0a82701102ccb8014c66ea88506
......@@ -130,7 +130,7 @@ def run_tests():
with pool as executor:
futures = {path: executor.submit(runner, path) for path in tests}
try:
for future in concurrent.futures.as_completed(futures.values(), 120):
for future in concurrent.futures.as_completed(futures.values(), 240):
path, status, duration = future.result()
print(f"[{status.ascii()}] ({duration.total_seconds():2.2f}s) {path.name}")
except TimeoutError:
......
# coding: utf-8
# TODO
\ No newline at end of file
......@@ -173,10 +173,16 @@ class ExpressionVisitor(NodeVisitor):
else:
yield "co_await"
else:
if is_get and node.func.value.type.inherits(TY_FUTURE, TY_FORKED):
if is_get and node.func.value.type.inherits(TY_FORKED):
yield from self.visit(node.func.value)
return
yield "call_sync"
elif is_get and node.func.value.type.inherits(TY_FUTURE):
yield "(typename std::remove_cvref_t<decltype(*"
yield from self.visit(node.func.value)
yield ".operator->())>::promise_type::value_type{})"
return
else:
yield "call_sync"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment