-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overloading the set_thread_affinity method for Windows compatibility #193
base: master
Are you sure you want to change the base?
Overloading the set_thread_affinity method for Windows compatibility #193
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #193 +/- ##
=======================================
Coverage 72.97% 72.97%
=======================================
Files 8 8
Lines 396 396
Branches 65 65
=======================================
Hits 289 289
Misses 68 68
Partials 39 39
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@SENAI-GilmarCorreia Do you mind if I push some changes to your branch? |
No problem! @saikishor |
@SENAI-GilmarCorreia I've fixed and opened a PR: SENAI-GilmarCorreia#1. If it looks good to you, please merge it |
Make the set_thread_affinity more generic to be usable for windows
@saikishor Done! |
@SENAI-GilmarCorreia There are some failing builds already, can you check? |
@saikishor I've just fixed the issue by using the |
#ifdef _WIN32 | ||
#include <windows.h> | ||
#else | ||
#ifdef __unix__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know which platforms we end up targeting or want to support, but just leaving some text here to ruminate on:
However, compilers for OSX, iOS, and Darwin do not define
__unix__
. To detect all BSD OSes, including OSX, iOS, and Darwin, use an#if
/#endif
that checks for__unix__
along with__APPLE__
and__MACH__
(see the later section on OSX and iOS).
Just me and my Windows setup again :)