Re: About 'futures'

2005-03-09 Thread Rob Browning
Marius Vollmer <[EMAIL PROTECTED]> writes: > So futures are clearly faster than threads (as expected). Nice! Indeed, and as I think someone may have mentioned, we definitely need some clarification in the docs, since they don't make it clear how futures differ from threads. -- Rob Browning rlb

Re: About 'futures'

2005-03-09 Thread Marius Vollmer
Marius Vollmer <[EMAIL PROTECTED]> writes: > (I will also try to benchmark them, but there is a bug right now that > prevents me from using a huge number of threads... (that bug is not > related to futures)) Okaaay, after fixing a couple of nice bugs (gdb is really good with threads these day

Re: About 'futures'

2005-03-09 Thread Marius Vollmer
Mikael Djurfeldt <[EMAIL PROTECTED]> writes: >> Would that make sense? > > I don't think so for obvious reasons. It would not make sense to > spawn new pthreads for the kind of usage patterns for which futures > are intended. In my opinion it's better to scrap futures entirely than > to provide t

Re: About 'futures'

2005-03-09 Thread Marius Vollmer
Rob Browning <[EMAIL PROTECTED]> writes: > Though is a terminated thread very "heavy"? i.e. is it much heavier > than a cons pair? Yes. It is a scm_i_thread struct, but the OS thread has been deallocated already. ___ Guile-devel mailing list Guile-d

Re: About 'futures'

2005-03-08 Thread Kevin Ryde
Mikael Djurfeldt <[EMAIL PROTECTED]> writes: > > The current implementation caches a number of "workers", so rather > than spawning a new thread, Do they get gc'ed after a while? The relative lightness of futures probably wants mentioning in the manual. _

Re: About 'futures'

2005-03-08 Thread Rob Browning
Marius Vollmer <[EMAIL PROTECTED]> writes: > what is the difference between > > (join-thread (begin-thread (foo))) > > and > > (future-ref (future (foo))) > > I am thinking about implementing futures as just > > (define-macro (future exp) `(begin-thread ,exp)) > (define future-ref

Re: About 'futures'

2005-03-08 Thread Mikael Djurfeldt
On Tue, 08 Mar 2005 19:04:17 +0100, Marius Vollmer <[EMAIL PROTECTED]> wrote: > what is the difference between > > (join-thread (begin-thread (foo))) > > and > > (future-ref (future (foo))) The first construct is guaranteed to start a new OS thread with its own, complete, dynamic contex

About 'futures'

2005-03-08 Thread Marius Vollmer
Hi, what is the difference between (join-thread (begin-thread (foo))) and (future-ref (future (foo))) I am thinking about implementing futures as just (define-macro (future exp) `(begin-thread ,exp)) (define future-ref join-thread) Would that make sense? ___