Closed sanjosh closed 7 years ago
We've tried a similar threadpool internally and haven't had great results (although I think one exists in the fbthrift repo), so I'm hesitant to merge because we don't use this internally. If it works for you, great though.
(Maybe we should start a contrib directory instead?)
Added BoundThreadFactory which binds each new thread to a specified CPU core. This is useful for NUMA processing
Added test to verify that the threads created by this factory get bound to specified core
Please let me know if there is a portable way in folly or wangle to set thread affinity. Right now, I am using pthread_setaffinity_np()