refactor: made the "processing flushing coroutines" process a separate C function.