mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 08:21:32 +00:00
disable pinToCpu for OSX
This commit is contained in:
@@ -463,10 +463,11 @@ else:
|
||||
## 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
|
||||
## shouldn't use this proc.
|
||||
var s {.noinit.}: CpuSet
|
||||
cpusetZero(s)
|
||||
cpusetIncl(cpu.cint, s)
|
||||
setAffinity(t.sys, sizeof(s), s)
|
||||
when not defined(macosx):
|
||||
var s {.noinit.}: CpuSet
|
||||
cpusetZero(s)
|
||||
cpusetIncl(cpu.cint, s)
|
||||
setAffinity(t.sys, sizeof(s), s)
|
||||
|
||||
proc createThread*(t: var Thread[void], tp: proc () {.thread, nimcall.}) =
|
||||
createThread[void](t, tp)
|
||||
|
||||
Reference in New Issue
Block a user