Hi! I would like to add Guile scripting to an actual program to allow a user to write simple network-related scenarios. Those scenarios will be run in parallel on several entities. The application is event-driven and I want to hide this fact to the user. She should be able to write a scenario in a simple blocking style:
#v+ (let ((v1 (do-something-blocking "arg1" "arg2")) (v2 (do-something-blocking "arg3" "arg4"))) (when (< (+ v1 v2) 10) (...))) #v- `do-something-blocking` is a registered function written in C. I want to be able to pause the execution inside this function and then resume it later (when I my program got the data wanted by the user). In the meantime, another "cooperative thread" may be executed. In Lua, this is something that can be done with coroutines which can be yield and resumed from C. In Guile, there are continuations but I have hard time to understand how this should work from C. What would be the equivalent of this in Guile? http://kristianrumberg.wordpress.com/2010/11/21/135/ -- /* * We used to try various strange things. Let's not. */ 2.2.16 /usr/src/linux/fs/buffer.c