dysfun@treehouse.systems ("gaytabase") wrote:
i did a really simple and nice thing that is almost certainly not the final answer i will settle on - i have a single pool per thread of spare individually allocated cachelines to reuse for three kinds of queue object. for a cross-thread message queue, it can hold one message. for a thread-local queue, it can hold two and for a gin-local queue it can hold 3.
it's the thread-local queue i don't think it's right for. you can only store 2 of them in a node because entries are 3 pointers in size. gin queues are likely to remain extremely short in practice (in fact empty for most gins).