guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fibers usage


From: Catonano
Subject: fibers usage
Date: Tue, 11 Dec 2018 08:34:18 +0100

I'm trying to create a server with Fibers

I copied the ping sever provided as an example in Fibers

I changed it a bit and I tried to run it

it doesn't  work

I run the server, I call it from the REPL

I send a request to the server, the I read the reply

I mean that I repeatedly call "read-line" on the socket connected to the
server

After a few times, In the middle of the reply, the prompt doesn't come back
anymore

But then, when I stop the server with ctrl-c, on the client the whole
missing line comes out suddenly

Here's a picture (the server in the upper pane, note the "^C" string and
the client in the lower pane)
https://imgur.com/a/1Qt2b4o

I am misunderstanding how Fibers is meant to be used

Here's the relevant excerpt from the server
https://gitlab.com/humanitiesNerd/guile-lsp/blob/master/lsp-server.scm#L60

I also partially described the thing here
https://github.com/aconchillo/guile-json/issues/23#issuecomment-445885603

what am I doing wrong ?

Thanks in advance


reply via email to

[Prev in Thread] Current Thread [Next in Thread]