mirror of
https://github.com/wassname/ray.git
synced 2026-07-11 17:59:28 +08:00
Code cleanup about python3 asyncio compat (#11134)
* cleanup python3 compat and others
This commit is contained in:
committed by
GitHub
parent
0dcfa9ed6c
commit
f0dba6bd2b
@@ -136,10 +136,7 @@ def wrap_to_ray_error(exception: Exception) -> RayTaskError:
|
||||
|
||||
|
||||
def ensure_async(func: Callable) -> Callable:
|
||||
if inspect.iscoroutinefunction(func):
|
||||
return func
|
||||
else:
|
||||
return sync_to_async(func)
|
||||
return sync_to_async(func)
|
||||
|
||||
|
||||
class RayServeWorker:
|
||||
|
||||
Reference in New Issue
Block a user