Thread overview |
---|
December 03, 2013 Thread affinity? | ||||
---|---|---|---|---|
| ||||
In core.thread I don't see a portable way to pin a thread to a specific core, or at least pin the thread to whatever core it is currently running in. I found this solution, but it's for Windows only. http://www.gamedev.net/blog/1140/entry-2254424-setting-thread-affinity-on-windows-in-d/ I can find solutions for pthread coded in C/C++, but I'm not sure how to apply these solutions when using the D Thread class. I may be able hack something out, but I need to be sure it's safe and correct. http://stackoverflow.com/questions/1407786/how-to-set-cpu-affinity-of-a-particular-pthread Any help is appreciated. --rt |
December 04, 2013 Re: Thread affinity? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rob T | On Tuesday, 3 December 2013 at 17:10:07 UTC, Rob T wrote: > In core.thread I don't see a portable way to pin a thread to a specific core, or at least pin the thread to whatever core it is currently running in. > > I found this solution, but it's for Windows only. > > http://www.gamedev.net/blog/1140/entry-2254424-setting-thread-affinity-on-windows-in-d/ > > I can find solutions for pthread coded in C/C++, but I'm not sure how to apply these solutions when using the D Thread class. I may be able hack something out, but I need to be sure it's safe and correct. > > http://stackoverflow.com/questions/1407786/how-to-set-cpu-affinity-of-a-particular-pthread > > Any help is appreciated. You should file an issue [0] as this should actually be in core.thread. [0] https://d.puremagic.com/issues/enter_bug.cgi |
December 04, 2013 Re: Thread affinity? | ||||
---|---|---|---|---|
| ||||
Posted in reply to qznc | On Wednesday, 4 December 2013 at 08:38:12 UTC, qznc wrote:
>
> You should file an issue [0] as this should actually be in core.thread.
>
> [0] https://d.puremagic.com/issues/enter_bug.cgi
I filed an enhancement request for the thread module.
Digging deeper, I notice that module core.sys.posix.pthread is missing the affinity related functions, so I'll file that as a bug.
--rt
|
August 21, 2016 Re: Thread affinity? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rob T | On Wednesday, 4 December 2013 at 23:23:51 UTC, Rob T wrote: > On Wednesday, 4 December 2013 at 08:38:12 UTC, qznc wrote: >> >> You should file an issue [0] as this should actually be in core.thread. >> >> [0] https://d.puremagic.com/issues/enter_bug.cgi > > I filed an enhancement request for the thread module. > > Digging deeper, I notice that module core.sys.posix.pthread is missing the affinity related functions, so I'll file that as a bug. > > --rt :( https://issues.dlang.org/show_bug.cgi?id=11686 |
Copyright © 1999-2021 by the D Language Foundation