comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: gcov in multithreaded applications
Date: 2000/08/30
Date: 2000-08-30T00:00:00+00:00	[thread overview]
Message-ID: <wcc7l8y6cr2.fsf@world.std.com> (raw)
In-Reply-To: 8oip2j$ut0$1@nnrp1.deja.com

daelen@my-deja.com writes:

> Note that aborting the tasks is not an option because not all tasks-
> names are known or in scope.

Task names don't need to be visible in order to abort them.  You can use
package Ada.Task_Identification.  You could have each infinitely-looping
task register itself (ie put its ID in some data structure).  Then you
could abort all those tasks at the appropriate time, from some central
place.

Alternatively, you could make each task do an ATC:

    task body T is
    begin
        select
            delay 10.0;
        then abort
            loop -- infinite loop here
                ...
            end loop;
        end select;
    end T;

Then all the tasks will go away after approx 10 seconds.

A better solution would be to simply write out the profiling data -- it
seems ugly to add complexity to your application just for the sake of
profiling.  I imagine there's a way to do that, but I don't know what it
is.

- Bob




  reply	other threads:[~2000-08-30  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-30  0:00 gcov in multithreaded applications daelen
2000-08-30  0:00 ` Robert A Duff [this message]
2000-08-31 21:58 ` Jean-Pierre Rosen
2000-09-07 23:44 ` Dr Adrian Wrigley
replies disabled

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