comp.lang.ada
 help / color / mirror / Atom feed
* Tasking and preemption
@ 1998-12-11  0:00 Thomas Handler
  1998-12-11  0:00 ` dennison
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Handler @ 1998-12-11  0:00 UTC (permalink / raw)


Hi to everyone!

I'm trying to get into Ada and have now passed the tasking mechanism
provided by Ada95.
My problem is that my understanding of preempting seems not to match
with that of my system ;-)

I'm using GNAT 3.09p on Linux with libpthreads and when doing a simple
program with two tasks where each task body is simply puttnig a string
in a loop to the screen the tasks seem to have a real cooperative
behavior, i.e. Task B starts working after Task A has finished
(independent of the length of the loop).
Building a delay into the loop has the desired effect.

So my question is: In the RM preemption is based on calling blocking
statements (like delay), as far as I understand there is no definition
of thread supported preemption. Is this true (i.e. I have to take care
in my program to make calls to blocking statements) or am I terribly
wrong?

Any hints will be greatly appreciated

Thomas Handler




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1998-12-14  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-11  0:00 Tasking and preemption Thomas Handler
1998-12-11  0:00 ` dennison
1998-12-13  0:00   ` Thomas Handler
1998-12-14  0:00     ` Mats Weber
1998-12-14  0:00     ` dennison
1998-12-13  0:00   ` Thomas Handler

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