Re: Running guile single-threaded?

2020-05-17 Thread Caleb Ristvedt
> I don't this is possible without building guile using --without-threads > argument to configure. Otherwise, the mutl-threaded gc is included. Good to know, thanks. I'll have to figure out a way to use clone+exec safely, then (calling process is multi-threaded), probably by writing an extension i

Running guile single-threaded?

2020-05-17 Thread Caleb Ristvedt
I'm trying to use unshare() with the CLONE_NEWUSER flag, but this requires that the process be single-threaded (otherwise I always get EINVAL). /proc//task has 6 entries when I launch guile, 5 after disabling automatic finalization. I can't seem to find a way to get that down to 1. Is this feasible

guile-fibers questions

2019-05-30 Thread Caleb Ristvedt
(Not sure if this is the right place to ask ¯\_(ツ)_/¯) I'm in the position of wanting to use guile-fibers for a server (with the usual "make a new fiber for each new client" pattern), but my "communication with the outside world" goes beyond reading and writing on ports - I actually have to do som

Re: Continuations in custom port: "cannot invoke continuation from this context"

2019-03-31 Thread Caleb Ristvedt
more carefully. But I suspect that the code is > going to C land and then enters the scheme again > via the hooks and then continuations won't work as expected. > > /Stefan > > On Thu, Mar 28, 2019 at 5:42 AM Caleb Ristvedt > wrote: > >> I have a procedure that

Continuations in custom port: "cannot invoke continuation from this context"

2019-03-27 Thread Caleb Ristvedt
I have a procedure that writes to an output port, a procedure that reads from an input port, and some processing that I want to do in between. So I figured that I'd try my hand at using continuations to write a custom input/output port that would hook the two procedures together. The idea is that I