15
I want to implement a CoreLocal map, which works just like ThreadLocal, only it returns a value that is specific to the core the current thread is running on.
The reason for this is that I want to write code that will take a job from a queue, but I want to give priority to jobs that will have their associated data already be in the same L1 cache as the thread picking the job from the queue. So, instead of one job queue for the entire program, I want to have a queue for each core and only when a queue is empty will a worker thread go looking at the queues of other cores.