I'm thinking I could make this work with an Arc<Mutex<Vec>> stored in the thread-local, and sending a clone over the the driver thread. But it feels like this should be doable using a compare-and-swap of sorts, but unsure how to make this work correctly. This should be common?
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This almost seems like having a database (standalone or in-mem one) with thread local caching? Do you have an example of what kind of code would use that pattern?
-
haha, so this is for a logger. Actually believe
@sheevink suggested this. But the idea is to capture log messages into a thread-local bump allocator, and then every ~250ms we wake a driver thread that swaps the bump allocators and then logs the messages. - 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.