[Swift-devel] Re: restart variable scoping.
Ben Clifford
benc at hawaga.org.uk
Thu May 22 16:42:52 CDT 2008
On Thu, 22 May 2008, Mihael Hategan wrote:
> for k in [1:2] {
> X[k] = echo(k);
> }
>
> for k, v in X {
> Y[k] = X[k];
> }
> For the first loop it's fairly clear. k=1 - thread 1-1, k=2 - thread
> 1-2. But on the second loop this is determined by the order in which the
> echoes complete. It can very well be that echo(2) completes first, so
in the second loop, you're indexed by v.
--
More information about the Swift-devel
mailing list