[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strange threading behaviour in guile-16.1 (--with-threads) and (gtk-main
Strange threading behaviour in guile-16.1 (--with-threads) and (gtk-main): gtk-main blocks all other threads
Fri, 09 Feb 2007 10:55:04 +0100
Thunderbird 220.127.116.11 (Windows/20061207)
I made a short program (see below) to demonstrate the problem:
as soon as I call (gtk-main), all other threads are quickly frozen. From
another application we have, creating new threads
I now that guile 1.6.1 has strange problems with threads, but this seems
to me a bit too far, like gtk would lock the complete guile interpreter.
Thanks for any help in advance!
;;some test code for formatting text to a file in a multi-thread environment
;; This code demonstrates that (gtk-main) function blocks
;; (all) other threads.
;; No idea why...
(use-modules (ice-9 threads))
(use-modules (gnome gtk))
(let ((file (open-output-file "test.txt")))
(do ((i 0 (+ 1 i)))
((>= i 100))
(display "writing a line\n")
(simple-format file "hep ~A ~%" i))
(display "before gtk-main\n")
; this to prove that guile without GTK doesn't prevent autonomous
threads to execute.
;(do ((i 0 (+ 1 i)))
; ((>= i 100))
; (display "looping...\n")
; (sleep 1))
- Strange threading behaviour in guile-16.1 (--with-threads) and (gtk-main): gtk-main blocks all other threads,
Stanislas Pinte <=