comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: A Simpler Find Tool
Date: Sun, 21 May 2017 19:22:51 +0200
Date: 2017-05-21T19:22:51+02:00	[thread overview]
Message-ID: <ofsi6v$e81$1@dont-email.me> (raw)
In-Reply-To: <d39a1cbe-9068-4cc3-8f0e-c05e4700befc@googlegroups.com>

On 05/21/2017 07:04 AM, Brian Kolden wrote:
>
> I'm using a request and reserve model to determine which threads are waiting
> and which are busy. The threads call End_Thread when they finish their work
> in order to be available to be queued again. I think the model itself is
> good, but I was unhappy with how I find the sleeping threads. Does anyone
> have a cleaner suggestion?

This feels backward to me. In Ada, tasks schedule themselves, so it seems more 
natural for the task to wait until there's work to do and then do it than for 
the work to look for an available task.

I'd suggest you replace your task pool with an instance of PragmARC.Job_Pools.

The PragmAda Reusable Components are available from

https://pragmada.x10hosting.com/

and

https://github.com/jrcarter/PragmARC

-- 
Jeff Carter
"I soiled my armor, I was so scared."
Monty Python & the Holy Grail
71

      parent reply	other threads:[~2017-05-21 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21  5:04 A Simpler Find Tool Brian Kolden
2017-05-21  6:49 ` Simon Wright
2017-05-22  3:19   ` Brian Kolden
2017-05-21  9:44 ` G.B.
2017-05-21 17:22 ` Jeffrey R. Carter [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox