unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Stefan Israelsson Tampe <stefan.itampe@gmail.com>,
	guile-devel <guile-devel@gnu.org>
Subject: Re: suspendable soft ports
Date: Thu, 12 May 2022 15:56:37 +0200	[thread overview]
Message-ID: <f85b45cdf7a53614dbbe8f7827e495238b093b7d.camel@telenet.be> (raw)
In-Reply-To: <CAGua6m1gz=48boijsBkfjJwV=_R91DrpsQrCN=YDafPXjiA-qg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

Stefan Israelsson Tampe schreef op do 12-05-2022 om 15:25 [+0200]:
> I did a take to make the soft-ports suspendable and here is an idea,
> 
> http://itampe.com/suspendable-soft-ports.html
> 
> Let me know if you are interested, I could refactor out these files
> to a project of their own, but really something like this should be
> in guile.

+1 (for moving into Guile, though as a separate project would be
sufficient for my use cases).  I need something like this for BSD
socket integration in Scheme-GNUnet (which uses Guile-Fibers and hence
needs suspendable ports). There are other uses as well (see recent
IRC).

It would also solve (from (fibers)Barriers):

   Accidental continuation barriers are bugs, and the Guile developers
have been working on removing them over the years.  By now, most of the
high-priority accidental barriers are gone.  Those that are left
include:

   [...]
   * R6RS custom binary port callbacks
   * Legacy "soft port" callbacks
   [...]

Something that appears to be missing: integration with C.  Does calling
scm_get_u8 from C work (assuming that no actual suspension happens)? 
Likewise for scm_get_bytevector_n, scm_seek, ...

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

      reply	other threads:[~2022-05-12 13:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 13:25 suspendable soft ports Stefan Israelsson Tampe
2022-05-12 13:56 ` Maxime Devos [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

  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=f85b45cdf7a53614dbbe8f7827e495238b093b7d.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=guile-devel@gnu.org \
    --cc=stefan.itampe@gmail.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).