Browse thread
[Caml-list] Python's yield, Lisp's call-cc or C's setjmp/longjmp in OCaml
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Brown <caml-list@d...> |
| Subject: | Re: [Caml-list] Python's yield, Lisp's call-cc or C's setjmp/longjmp in OCaml |
On Thu, Dec 18, 2003 at 01:05:20AM -0600, Brian Hurt wrote: > > Doing it using a closure is more difficult, since we need to reproduce the > > stack using a data structure. That goes of course for all recursive data > > structures. > > > > Stupid question: would it be possible/usefull to have the yielding > function run as a seperate thread of execution, in a produce/consumer sort > of way? Yes. But if the computation per context switch is low a large portion of the CPU will be spent doing the context switches. Dave ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners