Re: How to determine if task is busy or not?
- From: Ludovic Brenta <ludovic@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 8 Aug 2009 03:56:11 -0700 (PDT)
Tomek Walkuski wrote:
Is there any way to determine if task is busy or not?
I have pool of worker tasks and I want to choose one of them to give
some work to do.
I don't think you should see the problem in these terms. You don't
have to select a task from the pool; the tasks select themselves as
they become available for a new job, e.g. each task would look like
loop
Queue.Get_Next (Job);
Process (Job);
end loop;
where Queue is a protected object and Get_Next removes a job from it
and passes it to the task. Of course, if there are no jobs in the
queue, it blocks until one arrives.
HTH
--
Ludovic Brenta.
.
- Follow-Ups:
- Re: How to determine if task is busy or not?
- From: Dmitry A. Kazakov
- Re: How to determine if task is busy or not?
- References:
- How to determine if task is busy or not?
- From: Tomek Walkuski
- How to determine if task is busy or not?
- Prev by Date: How to determine if task is busy or not?
- Next by Date: Re: How to determine if task is busy or not?
- Previous by thread: How to determine if task is busy or not?
- Next by thread: Re: How to determine if task is busy or not?
- Index(es):
Relevant Pages
|