2
1
Fork
You've already forked chicken
0

Unstable output from threads to the REPL #36

Open
opened 2024年02月14日 03:39:39 +01:00 by corpix · 2 comments
corpix commented 2024年02月14日 03:39:39 +01:00 (Migrated from gitlab.com)
Copy link

Hi.
I am using Chicken Scheme and have a lot of frustration with REPL.
The problem is if you start some thread, something like:

(import (srfi-18))
(thread-start! (lambda () (let loop () (thread-sleep! 1) (display 'hi) (newline) (flush-output) (loop))))

It will print hi every second:

#<thread: thread276>
#;1> hi
hi
hi
hi
...

But then if you try to evaluate some variable, for example using geiser-eval-last-sexp, output to the REPL stops. While geiser-show-logs contains multiple repetitions of following message

ERROR: Unexpected queue input:
 hi

I've looked at geiser-con--tq-filter, where this error logged... and come to conclusion there is no simple way to make this kind of asynchronous output work. But maybe I am missing something

Hi. I am using Chicken Scheme and have a lot of frustration with REPL. The problem is if you start some thread, something like: ```scheme (import (srfi-18)) (thread-start! (lambda () (let loop () (thread-sleep! 1) (display 'hi) (newline) (flush-output) (loop)))) ``` It will print `hi` every second: ```console #<thread: thread276> #;1> hi hi hi hi ... ``` But then if you try to evaluate some variable, for example using `geiser-eval-last-sexp`, output to the REPL stops. While `geiser-show-logs` contains multiple repetitions of following message ```console ERROR: Unexpected queue input: hi ``` I've looked at `geiser-con--tq-filter`, where this error logged... and come to conclusion there is no simple way to make this kind of asynchronous output work. But maybe I am missing something
jaor commented 2024年02月14日 04:15:48 +01:00 (Migrated from gitlab.com)
Copy link

moved from geiser#65

moved from geiser#65
jaor commented 2024年02月14日 04:17:50 +01:00 (Migrated from gitlab.com)
Copy link

I moved the issue to geiser-chicken, in case the original developer is watching. Generally speaking, thread support in geiser is problematic, and the solution would need to be chicken-specific. Unfortunately, I don't know enough about the implementation to be of help here. Sorry!

I moved the issue to geiser-chicken, in case the original developer is watching. Generally speaking, thread support in geiser is problematic, and the solution would need to be chicken-specific. Unfortunately, I don't know enough about the implementation to be of help here. Sorry!
Sign in to join this conversation.
No Branch/Tag specified
master
0.17
0.16
0.14
0.13
0.12
0.11.2
0.11.1
0.11
0.10
0.9
0.8.1
0.8
0.7
0.6
0.5
0.4
0.3
0.2.2
0.2.1
0.2
0.1.4
0.1.3
0.1.2
0.1.1
0.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geiser/chicken#36
Reference in a new issue
geiser/chicken
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?