From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] Spew's Concurrency Extension
Date: Sat, 2 Jul 2016 14:07:37 +0200 [thread overview]
Message-ID: <74e4c1cb15cfd55b308b0ea6a68bc89b@felloff.net> (raw)
In-Reply-To: <CAAsuYKdk==tKjQR5vvneQzz5NKj2KiSHHmdgA9kwjH6_WwGq+Q@mail.gmail.com>
the paper states:
"A channel receive operation val = @chan is rewritten as:
recv(c, c->@out); val = c->@out;"
this is wrong, because channels are a shared resoure, and
you share the intermediate values. so if i have two processes,
doing the recive operation, they'll trash each others
c->@out values. the same applies to send of course.
say, the recv() completes on one process, then scheduler
comes it and runs the other processes recv() overriding
the @out member of the struct.
also note, that recv() can take a nil argument if you do
not need the value, but complete the recv() operation.
you do not need dummy value.
--
cinap
prev parent reply other threads:[~2016-07-02 12:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-01 19:45 Benjamin Purcell
2016-07-02 0:57 ` [9front] " kokamoto
2016-07-02 12:07 ` cinap_lenrek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=74e4c1cb15cfd55b308b0ea6a68bc89b@felloff.net \
--to=cinap_lenrek@felloff.net \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).