Ad-hoc library to pin threads