Skip to content

Commit bb8d4eb

Browse files
authored
Merge pull request #381 from mjguzik/thread_bind
2 parents 5803928 + b941b03 commit bb8d4eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cpucounters.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class TemporalThreadAffinity // speedup trick for Linux, FreeBSD, DragonFlyBSD,
136136
const bool restore;
137137

138138
public:
139-
TemporalThreadAffinity(uint32 core_id, bool checkStatus = true, const bool restore_ = false)
139+
TemporalThreadAffinity(uint32 core_id, bool checkStatus = true, const bool restore_ = true)
140140
: restore(restore_)
141141
{
142142
assert(core_id < 1024);
@@ -174,7 +174,7 @@ class TemporalThreadAffinity // speedup trick for Linux, FreeBSD, DragonFlyBSD,
174174
const bool restore;
175175

176176
public:
177-
TemporalThreadAffinity(const uint32 core_id, bool checkStatus = true, const bool restore_ = false)
177+
TemporalThreadAffinity(const uint32 core_id, bool checkStatus = true, const bool restore_ = true)
178178
: set_size(CPU_ALLOC_SIZE(maxCPUs)), restore(restore_)
179179
{
180180
assert(core_id < maxCPUs);
@@ -212,7 +212,7 @@ class TemporalThreadAffinity // speedup trick for Linux, FreeBSD, DragonFlyBSD,
212212
#elif defined(_MSC_VER)
213213
ThreadGroupTempAffinity affinity;
214214
public:
215-
TemporalThreadAffinity(uint32 core, bool checkStatus = true, const bool restore = false)
215+
TemporalThreadAffinity(uint32 core, bool checkStatus = true, const bool restore = true)
216216
: affinity(core, checkStatus, restore)
217217
{
218218
}

0 commit comments

Comments
 (0)