[Swift-devel] problems with external dependencies
Michael Wilde
wilde at mcs.anl.gov
Mon Mar 23 11:05:20 CDT 2009
On 3/23/09 2:26 AM, Ben Clifford wrote:
> At the moment, I think the only thing that will wait for an array to be
> closed is an app procedure taking that array as a parameter. When thats a
> file array, you will then get the file handling that you don't want.
Ah, but following up on Mihael's latest point: if on the other hand its
an array of externals, *then* a dummy app() like a localhost "sleep 0"
might give the desired effect of "wait on all members of a *set* of
externals".
Then you might be able to say in some code:
if(wait(events)) {
stuff;
}
where wait() returns true. Since an app() cant currently return true, it
needs to be wrapper in a compound that converts a file from wait() into
a true via readData(). Ive used that technique in oops. That could be
streamlined.
Did we establish that a compound proc() will, or will not, wait for all
of its args that are external() to be set before either starting, or
exiting? I *think* it was either stated or implied earlier in this
thread that it will *not* wait to start, and only wait to exit if the
value is needed in an assignment statement or a call to an app, but at
this point I need to write all this down, with examples, to remember it.
I'm going to retire from this thread until I get a chance to try some of
these refinements. Its not urgent at the moment, but interesting.
It would be good to capture in one place in the users guide, "All the
things a Swift coder needs to know about parallelism". 2.3 and 2.3 try
to do that, but there are many subtleties and the treatment needs more
details and examples. I'd like to contribute to that but need to find time.
More information about the Swift-devel
mailing list