[Swift-devel] could we set the job sequence without a file dependency?

Ben Clifford benc at hawaga.org.uk
Tue Mar 24 09:06:42 CDT 2009


On Tue, 24 Mar 2009, Zhao Zhang wrote:

> Say, Job A is broadcasting common data shared for all jobs. And Job B only
> needs to know that Job A is done, so he could read the common data.

ok, so there is a data dependency.

You can externals (like Mike has been using on the swift-user list) to 
represent data dependencies like that.

app (external commonData) A() {
  ...
}

app B(external commonData) {
 ...
}

external d = A();
B(d);

d represents your shared data set - by declaring it as 'external' you say 
that Swift should do data dependency handling, but should not attempt to 
manage the data itself.

d is mapped to the data, but in your head, rather than in Swift.

-- 



More information about the Swift-devel mailing list