Yes, not yielding control from a function in any evented framework will block the main event loop.
In programming languages that support coroutines, yielding a sleep every few loops will release the event loop. In languages without coroutines like javascript you will need to write your algorithm in CPS to release the event loop.
In programming languages that support coroutines, yielding a sleep every few loops will release the event loop. In languages without coroutines like javascript you will need to write your algorithm in CPS to release the event loop.