Email or username:

Password:

Forgot your password?
Top-level
dave

@abcdw yeah it would be nice to have explicit control over which thread is performing the evaluation like guile's cooperative repl. that repl was designed to integrate into async event loops (though it uses polling whereas a more modern design would use async i/o) where the evaluation often needs to happen in a "main" thread, not the thread of the repl client.

3 comments
Andrew Tropin

@dthompson Maybe it would be also cool to start evaluation in fiber, but I'm not yet fluent with its internals and at the moment don't know how to suspend/interrupt evaluation.

Also, I thought about reconstructing stack inside newly created thread, so the continuation can be performed without crossing continuation barrier. IDK yet how good this idea is :)

Andrew Tropin

@dthompson The documentation on coop server is kinda sparse, so I went reading the sources. It seems it spawns a thread, and you can enqueue some operations for it and call poll-coop-repl-server to perform the last queued operation on that thread, right?

Andrew Tropin

@dthompson I found system-async-mark, it seems I can have interruptible eval and don't need to stop the thread for that!

It will also solve the continuation barrier problem and also will prevent spawning a new thread for each request!

Go Up