We were using concurrent futures for async calls that cannot be awaited within the continuous_batching_scheduler. For all other operators, we were using asyncio Futures. Using the incorrect future seemed to block the scheduler queue from ever growing > 1.
This PR updates the future to check if we're running async or not (by checking if an async loop is present) and using the correct Future accordingly
Summary
continuous_batching_scheduler
. For all other operators, we were usingasyncio
Futures. Using the incorrect future seemed to block the scheduler queue from ever growing > 1.Testing
Using the following code, we can see batch_size > 1 being used: