First working draft of thread-local binding.
commit7bc009933e8926983e1f6676290a736b3e00575a
authorTom Tromey <tromey@redhat.com>
Fri, 11 Sep 2009 18:05:55 +0000 (11 20:05 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Fri, 11 Sep 2009 18:05:55 +0000 (11 20:05 +0200)
tree3e0d4281d1870b314574756cd8d7bd4f089e9564
parent03c8991ce85931dad358378b0d2ff17b7279b56d
First working draft of thread-local binding.

At least 2 of the 9 kinds of variable bindings should work ok --
defvaralias variables and ordinary variables.
All other kinds will exhibit weird behavior.
A simple program that works:

   (defvar zz t)
   (defvar buffer-a (get-buffer-create "zardoz"))

   (defun tha ()
     (dolist (v '("A" "B" "C" "D"))
(message "thread a: %s" v)
(yield))
     (setq zz nil))

   (defun thb ()
     (dolist (v '("E" "F" "G" "H" "I"))
(message "thread b: %s" v)
(yield)
))

   (with-current-buffer buffer-a
     (run-in-thread 'tha))
   (thb)

   (while zz
     (yield))
src/data.c
src/eval.c
src/lisp.h