Threads have attributes.  They can be hyperthreads.  They can have, or not have, core affinities.  I'm just saying that a simple exist/notexist does not describe what is needed in a thread.

Henry Rich

On 4/29/2022 9:47 PM, Raul Miller wrote:
On Fri, Apr 29, 2022 at 8:01 PM Henry Rich <[email protected]> wrote:
'Make sure there are Y threads' doesn't answer the need.  It's not
sufficient.  A primitive that allocates one thread with all the options
it might want, IS sufficient.
In what example is "make sure there are Y threads" not sufficient?

You need to write a verb that does what's needed, and yes, it will have
to take a lock.  Probably you would need to ensure that all packages
take the same lock.  That's a good argument for starting on that verb soon.
I need a lock if I am incrementing a thread count to reach Y, because
without that lock I do not know how many increments would be taking
place.

I do not need a lock when computing Y if Y does not depend on how many
threads are currently running.



--
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to