Hello again, some precisions about precise versions used:
I am on debian, x86, using the following packages: [EMAIL PROTECTED]:~/guile/tests$ dpkg -l | grep guile ii guile-1.6 1.6.8-6 The GNU extension language and Scheme interp ii guile-1.6-dev 1.6.8-6 Development files for Guile 1.6 ... ii guile-gnome0-gnome 2.7.99-4 Guile bindings for libgnome ... ii guile-gnome0-gtk 2.7.99-4 Guile bindings for GTK+, libglade, Pango and ... [EMAIL PROTECTED]:~/guile/tests$ Stanislas Pinte a écrit : > Hello, > > 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! > > Kind regards, > > Stan. > > ;; > ;;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)) > > (define (async-task2) > (let ((file (open-output-file "test.txt"))) > (display "mmm\n") > (do ((i 0 (+ 1 i))) > ((>= i 100)) > (display "writing a line\n") > (simple-format file "hep ~A ~%" i)) > > (close file) > (display "done\n"))) > > (make-thread async-task2) > > (display "before gtk-main\n") > (gtk-main) > (display "after\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)) > > _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user