Andy Pan
Andy Pan
`MaxAsyncTasksAtOneTime` is utilized to prevent the event loops from being starved by asynchronous tasks.
What's your specific scenario using `gnet`? More details would be helpful on this.
To clarify, `asyncTaskQueue` is not used just for leftover tasks because they can be appended with new tasks constantly while event loops are processing incoming I/O events. Furthermore, the event...
I think I've made myself clear about delaying tasks `asyncTaskQueue`: to avoid starving event loops for low-priority tasks in the queue. Again, `asyncTaskQueue` is not for high-priority tasks and >...
If you were trying to write multiple responses on one request, would using `AsnyncWritev` instead of `AsyncWrite` solve your latency problem here?
> 也许最简单最保险的方法是把 MaxAsyncTasksAtOneTime 变成可配置选项,让用户选择? This was an alternative in my mind. But adding a new configuration that requires users to comprehend the rationale behind it, I'm afraid this might make...
@IrineSistiana @someview Could you try out #563 and see if it reduces the latencies for your use cases? Thanks!
New thought: maybe introduce a new option `AsyncWriteNoDelay` and only if it's set to true, we put all asynchronous writes to `urgentAsyncTaskQueue`: ```go type Options struct { ... // AsyncWriteNoDelay...
At this point, I'm more worried about the precedence of events than I am about the starving issue. You see, there are some events like `Wake` that precede `AsyncWrite` currently,...
OOM caused by the unlimited queue should be the last thing we care about. It's like any memory allocator in any language or kernel, they don't account for the OOM...