On 2011-03-19 10:45:12 -0400, dsimcha <dsim...@yahoo.com> said:

I've added a priority property to TaskPool that allows setting the OS priority of the threads in the pool. This just forwards to core.thread.priority(), so usage is identical.

Great.

Next to "priority" I notice the "makeDaemon" and "makeAngel" functions... wouldn't it make more sense to mirror the core.thread API for this too and make an "isDaemon" property out of these?


Since we don't know what the API for querying stuff like this should be, I had made it private. I changed it to public. I realized that, even if a more full-fledged API is added at some point for this stuff, there should be an obvious, convenient way to get it directly from std.parallelism anyhow, and it would be trivial to call whatever API eventually evolves to set this value. Now, if you don't like the -1 thing, you can just do:

auto pool = new TaskPool(osReportedNcpu);

or

defaultPoolThreads = osReportedNcpu;

Also good.

--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to