From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Raeburn To: Keisuke Nishida Cc: Kalle Olavi Niemitalo , guile-emacs@sourceware.cygnus.com Subject: Re: Emacs Scheme interface Date: Tue, 28 Mar 2000 11:37:00 -0000 Message-id: References: <87n1njuww0.fsf@PC486.Niemitalo.LAN> X-SW-Source: 2000-q1/msg00065.html Keisuke Nishida writes: > > I would really like thread support in Emacs Scheme. Multiple > > threads should be able to process different buffers at the same > > time. Perhaps the "current buffer" should be thread-local. > Me too, but as long as we use the current Lisp functions, it may be > hard to work around... Have you tried Guile's multithread supoprt > with Guile Emacs? Does it work well? It won't if you try using Lisp in more than one thread -- dynamic variable bindings (function arguments, "let") are implemented in a way that is thread-unfriendly. That's one of the reasons I decided to start by converting the lower-level code to use Guile -- to get clean, working threads. If you only use Scheme in the extra threads, it might be okay, but there are places where Emacs can invoke Lisp code from signal handlers. (Sad but true.) I've no idea what impact that would have. Emacs 21, it appears, will have conservative GC that scans the stack. So switching stacks out from under it would be really unfriendly. Once we get to the point of being able to provide multiple threads in Lisp, we still have to figure out what the UI effects should be... Ken