From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: From: Venkatesh Srinivas Date: Thu, 28 Oct 2010 15:24:58 -0400 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=0016364d236d5c16970493b24d0a Subject: Re: [9fans] A little more ado about async Tclunk Topicbox-Message-UUID: 70a7cf98-ead6-11e9-9d60-3106f5b1d025 --0016364d236d5c16970493b24d0a Content-Type: text/plain; charset=UTF-8 On Thu, Oct 28, 2010 at 8:12 AM, Charles Forsyth wrote: > you're essentially replacing > f := open(name, ...) > ... > close(f) > > which runs as a sequential process, and subject to the usual rules for > sequential > composition, by > > f := open(name, ...) > ... > spawn clunk(f) > > which introduces a race with an invisible anonymous process with no means > of synchronisation. > > what could possibly go wrong with that? > > (actually, it's more complex than spawning a new process, but the added > complexity of a set of service processes changes the details but not the > existence of the race, and doesn't affect the anonymity.) > Hmm, I don't see the race there; perhaps I'm missing something or being blind; could you explain? Also, if that is racy, isn't this at least analogous? f := Sys->open(name, ...); ... # put f in a cyclic structure f = nil; evil_cyclic = nil; ... # wait until an invisible service process closes it, perhaps later? Thanks, -- vs --0016364d236d5c16970493b24d0a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Oct 28, 2010 at 8:12 AM, Charles Forsyth <forsyth@terzarima.net> w= rote:
you're essentially replacing
=C2=A0 =C2=A0 =C2=A0 =C2=A0f :=3D open(name, ...)
=C2=A0 =C2=A0 =C2=A0 =C2=A0...
=C2=A0 =C2=A0 =C2=A0 =C2=A0close(f)

which runs as a sequential process, and subject to the usual rules for sequ= ential
composition, by

=C2=A0 =C2=A0 =C2=A0 =C2=A0f :=3D open(name, ...)
=C2=A0 =C2=A0 =C2=A0 =C2=A0...
=C2=A0 =C2=A0 =C2=A0 =C2=A0spawn clunk(f)

which introduces a race with an invisible anonymous process with no means o= f synchronisation.

what could possibly go wrong with that?

(actually, it's more complex than spawning a new process, but the added= complexity of a set of service processes changes the details but not the e= xistence of the race, and doesn't affect the anonymity.)

Hmm, I don't see the race there; perhaps I'm mi= ssing something or being blind; could you explain?

Also, if that is racy, isn't this at least analogous?

f :=3D Sys->open(name, ...);
... # put f in a cycli= c structure
f =3D nil;
evil_cyclic =3D nil;
.= .. # wait until an invisible service process closes it, perhaps later?

Thanks,
-- vs
--0016364d236d5c16970493b24d0a--