Re: Threads and lexical scope

2014-01-14 Thread Panicz Maciej Godek
2014/1/14 Panicz Maciej Godek > Oh, I just realized that each thread was created in a new closure anyway, > so they weren't able to share the variable. Sorry for the confusion. > It was a confusion, because the lexical scopes of threads are obviously shared.

Re: Threads and lexical scope

2014-01-14 Thread Panicz Maciej Godek
Oh, I just realized that each thread was created in a new closure anyway, so they weren't able to share the variable. Sorry for the confusion.

Re: Threads and lexical scope

2014-01-14 Thread Panicz Maciej Godek
(sorry, I accidentally pressed ctrl+return, which caused my mail client to send the message). So here's the code: (for-each (lambda(i) (let ((thread (call-with-new-thread (lambda () (sleep (+ (random 10) 2)) (format #t "w

Re: Threads deadlock in select

2012-01-09 Thread Andy Wingo
Hi Andrew, Sorry for the late reply. On Fri 02 Sep 2011 16:29, Andrew Gaylard writes: > (gdb) bt > #0 0xfd7ffe89c257 in __lwp_park () from /lib/64/libc.so.1 > #1 0xfd7ffe8941f6 in mutex_lock_queue () from /lib/64/libc.so.1 > #2 0xfd7ffe894ca8 in mutex_lock_impl () from /lib/64/li

Re: threads in guile-1.8

2008-01-25 Thread Neil Jerram
"Pach Roman (DGS-EC/EHS2)" <[EMAIL PROTECTED]> writes: > Hello, Hello! > I have tried to move my software from guile-1.6 to 1.8. > The part using threads did not want to run. > So I tried a small test: > > guile> (use-modules (ice-9 threads)) > guile> (make-thread (lambda () '())) > > and become

Re: threads, muxes, gc, assert violation

2007-03-13 Thread Marco Maggi
"[EMAIL PROTECTED]" wrote: > Hmm. I could be way off base here, but what about > protecting s_mutexes with a scm_permanent_object() ? I am: for (int i=0; ihttp://lists.gnu.org/mailman/listinfo/guile-user

Re: Threads

2005-09-20 Thread Alan Grover
Tomas Zerolo wrote: > On Mon, Sep 19, 2005 at 11:24:34PM -0400, Alan Grover wrote: >>Though I read something recently that claimed some thread >>(mis-)implementations are more costly than a fork, and often more costly >>than you'd hope. Apparently, the Linux 2.6 thread implementation is in >>user-s

Re: Threads in 1.6.4 hanging: caused by accept?

2005-09-15 Thread Kevin Ryde
Alan Grover <[EMAIL PROTECTED]> writes: > > What would be the comprehensive list of calls that block all threads? > How do you figure that out? `gethost' is a bad one, it disappears deep into libc so select or whatever doesn't help. I ended up forking a subprocess to make the call. Or I guess th