This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

interpreter sessions


Um, sorry if this has been covered before, but I just got Guile 1.2 and
decided to try to put it into my application (it has a primitive script
system right now), and I didn't find a FAQ.

This application is session-based; each session has its own ID, and people
can connect to it, like some sort of daemon, give their session ID and
their password, and attach to their session. I have done this without
forking or anything, using select() and nonblocking sockets.

So I thought, before I could apply Guile to my stuff (and after getting
over the traditional gh_enter nuisance, I guess), that I needed it to be
able to keep the separate sessions separate, i.e. each session should be
able to load their own individual scripts and have their own variables and
contexts, and such, executing "in parallel", with the main program
switching to and executing the right contexts when an event comes in
destined for a particular session and context.

I probably even want functionality to open an input "pipe" (port?) from the
main program when they do queries, which the main program stuffs query
responses into when they arrive, but have to 'block' in the meantime, in
which time other events must be serviced, too, maybe even other blocking
queries in the same session!

I heard it might be possible with Tcl, but I'd rather not use Tcl. Is this
possible with Guile? If so, how? Couldn't find anything useful in the
(rather incomplete) docs.