From: Philippe Wang <philippe.wang.lists@gmail.com>
To: "Michał Maciejewski" <michal.m.pl@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Threads - how it actually works?
Date: Sat, 27 Jun 2009 18:27:13 +0200 [thread overview]
Message-ID: <4d1b2df20906270927v3e32513fh9ad355b2bcdc884@mail.gmail.com> (raw)
In-Reply-To: <906164100906270339j3af90566ta6545d3086449219@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2327 bytes --]
prev parent reply other threads:[~2009-06-27 16:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-27 10:39 Michał Maciejewski
2009-06-27 16:27 ` Philippe Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d1b2df20906270927v3e32513fh9ad355b2bcdc884@mail.gmail.com \
--to=philippe.wang.lists@gmail.com \
--cc=caml-list@inria.fr \
--cc=michal.m.pl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox