Closed quininer closed 4 years ago
If we use a thread local slab, then we must deal with thread exit, otherwise it may cause UB.
Using thread_local
will break thread safety of future, and I haven't solved idea yet.
We can reuse an object as much as possible. see https://github.com/quininer/ritsu/blob/master/src/action/timeout.rs#L7
io-uring
needs to allocate many trivial objects for sqe, such as timeout, iovec, sendmsg.IORING_FEAT_SUBMIT_STABLE
doesn't help us much because we don't submit immediately. We'd better use an slab allocator for this.