From: David Pirotte <david@altosw.be>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: port threadsafety redux
Date: Fri, 13 Feb 2015 16:35:36 -0200 [thread overview]
Message-ID: <20150213163536.3c2e380a@capac> (raw)
In-Reply-To: <87vbj816sg.fsf@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]
Hi Andy,
> ...
> This change fixed the crashes I was seeing, but it slows down port
> operations. For an intel chip from a couple years ago the slowdown was
> something on the order of 3x, for a tight putchar() loop; for Loongson
> it could be as bad as 26x. Mark was unhappy with this.
I agree with Mark here, especially because it slows down port operation even for
single threaded code.
> But there are situations where this is not enough and there are also
> situations where this is not wanted...
Indeed.
> One possible alternate solution would be to expose ports more to Scheme
> and so to make it easier and safer for Scheme to manipulate port data.
> This would also make it possible to implement coroutines in Scheme that
> yield when IO would block.
Not only does it sounds the best approach, but I can't see drawbacks, is there any?
I am in favor of this solution: in the end, only the user knows, and the way Mark
resumed this in his email is perfect [the last 3 paragraphs]
> Or, we could just make stdio/stderr be locked by default, and some other
> things not. Seems squirrely to me though.
I would not do that, even for these ports, I'd leave them under the user
locking responsiblity.
Cheers,
David
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-02-13 18:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 21:23 port threadsafety redux Andy Wingo
2015-02-13 18:35 ` David Pirotte [this message]
2015-02-17 12:11 ` Chris Vine
2015-03-04 10:18 ` Ludovic Courtès
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150213163536.3c2e380a@capac \
--to=david@altosw.be \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).