disable pinToCpu for OSX
This commit is contained in:
parent
5ce414141e
commit
a93ca14418
1 changed files with 5 additions and 4 deletions
|
|
@ -463,10 +463,11 @@ else:
|
||||||
## pins a thread to a `CPU`:idx:. In other words sets a
|
## pins a thread to a `CPU`:idx:. In other words sets a
|
||||||
## thread's `affinity`:idx:. If you don't know what this means, you
|
## thread's `affinity`:idx:. If you don't know what this means, you
|
||||||
## shouldn't use this proc.
|
## shouldn't use this proc.
|
||||||
var s {.noinit.}: CpuSet
|
when not defined(macosx):
|
||||||
cpusetZero(s)
|
var s {.noinit.}: CpuSet
|
||||||
cpusetIncl(cpu.cint, s)
|
cpusetZero(s)
|
||||||
setAffinity(t.sys, sizeof(s), s)
|
cpusetIncl(cpu.cint, s)
|
||||||
|
setAffinity(t.sys, sizeof(s), s)
|
||||||
|
|
||||||
proc createThread*(t: var Thread[void], tp: proc () {.thread, nimcall.}) =
|
proc createThread*(t: var Thread[void], tp: proc () {.thread, nimcall.}) =
|
||||||
createThread[void](t, tp)
|
createThread[void](t, tp)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue