This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Wrap the functions to tie threads to particular CPU cores (affinity) on Linux. | |
''' | |
import os | |
import cffi | |
__all__ = ['pthread_self', 'pthread_getaffinity_np', 'pthread_setaffinity_np'] |