Could use some help from Rust Twitter on this one: I want to provide each thread with a Vec in a thread-local. Then from another thread I want to periodically take ownership of the thread-local vecs and swap them with empty ones. Is there a good pattern/lib for this?
The goal is to fully amortize the allocation cost of storing log message, while also optimizing for batch writes to e.g. stdout, and reducing the amount of locking to a minimum. Ideally the thread-local bump allocator could be modeled without a Mutex... but mby smth to optimize.