James Mastros wrote:
> I don't like the name synchronized -- it implies that multiple things are
> happening at the same time, as in synchronized swiming, which is exactly the
> opposite of what should be implied. "Serialized" would be a nice name,
> except it implies serializing to a serial format, like disk. "Locked" is
> the best name I can think of, and it frankly isn't that good -- it's so
> vauge as to be able to mean almost anything.
>
> (Also, of course, all those /z/ names should have a s/z/s/ version, for
> those who speak a z-impared dialect of English.)
>
> -=- James Mastros
>
Agreed - maybe "is serial" instead, which suggests "is parallel" would be its
implicit counterpart.
If we have a situation that looks like this:
our method TakesForever ( int $num is serial ) is async {
# Do something that takes a long time...then:
$num++;
# $num has not been changed by anything else that might
# have access to $num.
}
my $age = 27;
TakesForever( $age );
$age += 20; # Fails somehow, because &TakesForever is working on $num
Maybe a better example is needed - this one is pretty contrived.