Re: [ovs-dev] [PATCH branch-2.15 1/1] python: Add cooperative_yield() API method to Idl

2021-12-17 Thread Ilya Maximets
On 12/3/21 16:04, Terry Wilson wrote: > When using eventlet monkey_patch()'d code, greenthreads can be > blocked on connection for several seconds while the database > contents are parsed. Eventlet recommends adding a sleep(0) call > to cooperatively yield in cpu-bound code. asyncio code has >

[ovs-dev] [PATCH branch-2.15 1/1] python: Add cooperative_yield() API method to Idl

2021-12-03 Thread Terry Wilson
When using eventlet monkey_patch()'d code, greenthreads can be blocked on connection for several seconds while the database contents are parsed. Eventlet recommends adding a sleep(0) call to cooperatively yield in cpu-bound code. asyncio code has asyncio.sleep(0). This patch adds an API method