[
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: | Philippe Wang <philippe.wang.lists@g...> |
| Subject: | Re: [Caml-list] Threads - how it actually works? |
if you have a thread that never allocates any value in the memory heap, then the thread may prevent the GC from working properly... 2009/6/27 Micha³ Maciejewski <michal.m.pl@gmail.com> > Hi, > > Some time ago I had some problems with threads. I had to make a > traffic lights simulation with cars as a academic project. I decided > to write it using ocaml with graph module and threads for timing > (since thread pausing didn't work in the same thread that the graph > module worked). If I remember correctly there was a loop in graph > module thread that was drawing some objects. Another looped thread was > changing objects positions and then was paused for some amount of time > using (I think) Unix module. I know that wasn't a good and optimal way > to do it, but I had only few days for it. > > Now the problem was that one of those thread never worked. It looked > like a graph thread was using whole cpu time, and there was no context > switching. Don't ask me to paste any code, because I dont have it. It > was quite long time ago and I had to do my project without timing. :-) > It was ocaml 10.*. So how threads are actually implemented in caml? > Using some kind of timing or atomic operations? > > regards > M > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- Philippe Wang mail@philippewang.info