async-compat icon indicating copy to clipboard operation
async-compat copied to clipboard

Only create/enter new runtime if one does not already exist?

Open bonsairobo opened this issue 1 year ago • 1 comments

From my reading of the code, Compat futures will unconditionally create and enter a new single-threaded tokio runtime. This seems potentially inefficient if a tokio runtime (maybe a multi-threaded one) already exists.

Would it be possible to check if a runtime already exists before entering a new one?

bonsairobo avatar Feb 26 '24 19:02 bonsairobo

BTW, #30 might be a solution for #2 as well, depending on the exact use case.

bonsairobo avatar Feb 26 '24 21:02 bonsairobo