From: "Jeffrey R. Carter" <spam.jrcarter.not@acm.nospam.org>
Subject: Re: Finalization of static package variables
Date: Thu, 10 May 2007 04:52:24 GMT
Date: 2007-05-10T04:52:24+00:00 [thread overview]
Message-ID: <cyx0i.45276$n_.17025@attbi_s21> (raw)
In-Reply-To: <1178753228.648765.89390@e65g2000hsc.googlegroups.com>
Adam Beneschan wrote:
>
> Maybe. I don't know anything about JEWL, so I don't know what the
> declaration of "Frame_Type" is or what the "Frame" function does. But
> if the Frame function uses an allocator to create an access-to-task,
> and if Frame_Type is a controlled type (or has controlled components)
> whose Finalize routine does something that terminates that task, then
> I can see how you would have a problem. According to 9.3, if you (or
> some routine in JEWL) have started a task with an allocator, then that
> task depends on the master that elaborates the access-to-task *type*
> (and any enclosing master). Assuming the access type is declared at
> the library level somewhere inside JEWL, then the only master it
> depends on is the environment task.
The task in JEWL is a singleton task declared in the specification of a
library-level private package. This task keeps track of how many frames
have been created and doesn't end until they've all been destroyed. The
frame in the subprogram is destroyed when it is finalized when the
subprogram returns; the frame in the package won't be finalized until
the task ends. With the frame in a subprogram, the call to Close isn't
strictly necessary (though it's a good idea). With the frame in the
package, the call to Close is necessary. Otherwise, the task won't end
until the frame is finalized, and the frame won't be finalized until the
task ends.
--
Jeff Carter
"C++ is like giving an AK-47 to a monk, shooting him
full of crack and letting him loose in a mall and
expecting him to balance your checking account
'when he has the time.'"
Drew Olbrich
52
next prev parent reply other threads:[~2007-05-10 4:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 21:55 Finalization of static package variables Manuel Collado
2007-05-09 8:13 ` Alex R. Mosteo
2007-05-09 8:20 ` Stephen Leake
2007-05-09 15:15 ` Adam Beneschan
2007-05-09 16:01 ` Markus E Leypold
2007-05-09 22:00 ` Manuel Collado
2007-05-09 23:27 ` Adam Beneschan
2007-05-10 4:52 ` Jeffrey R. Carter [this message]
2007-05-16 0:41 ` Randy Brukardt
2007-05-10 8:16 ` Alex R. Mosteo
2007-05-16 0:36 ` Randy Brukardt
2007-05-16 14:06 ` Adam Beneschan
2007-05-16 16:47 ` Jeffrey R. Carter
2007-05-16 19:10 ` Randy Brukardt
2007-05-22 4:41 ` christoph.grein
2007-05-22 6:25 ` tmoran
2007-05-22 22:19 ` Randy Brukardt
2007-05-10 10:57 ` Stephen Leake
2007-05-09 22:19 ` Manuel Collado
2007-05-10 5:38 ` AW: " Grein, Christoph (Fa. ESG)
2007-05-10 10:55 ` Stephen Leake
2007-05-11 18:12 ` Manuel Collado
2007-05-11 18:26 ` Robert A Duff
2007-05-12 19:17 ` Finalization of static package variables - summary Manuel Collado
2007-05-16 0:49 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox