caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Berke Durak" <berke.durak@gmail.com>
To: "Arnaud Spiwack" <Arnaud.Spiwack@lix.polytechnique.fr>
Cc: "Caml List" <caml-list@inria.fr>
Subject: Re: [Caml-list] The closing gap (warning: long, inflammatory rant)
Date: Mon, 21 Apr 2008 23:16:49 +0200	[thread overview]
Message-ID: <b903a8570804211416p6083ea08y24c06a883d1385c8@mail.gmail.com> (raw)
In-Reply-To: <480D01E4.5060207@lix.polytechnique.fr>

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]

Richard Jones:
> Garbage collectors and _not_ using threads both improve the safety of the
language.

Arnaud Spiwack:

> This might depend on what kind of thread interface you are provided with.
> Of course it's never easy to work with non-determinism, but if I take jocaml
> for instance, which gives you a process (in the sense of pi-calculus)
> interface to threads, and it makes it probably rather safe actually,
> possibly stronger safety when dealing with multiple processes (or UI threads
> possibly) than doing things with low-level primitves like fork and such.
>

That's the point.  The conventional threading model (mutable shared data and
mutexland) is unsafe by default.  It's like the good old days of manual
memory management in C, except
that you replace malloc/free with pthread_mutex_lock/pthread_mutex_unlock
and
signal 11 by deadlocks.

But it's actually worse because mutexing doesn't compose as well as malloc.
This means that it's difficult to increase the abstraction level.
-- 
Berke

[-- Attachment #2: Type: text/html, Size: 1313 bytes --]

  reply	other threads:[~2008-04-21 21:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21 12:27 Berke Durak
2008-04-21 13:11 ` Richard Jones
2008-04-21 13:29   ` Berke Durak
2008-04-21 14:44   ` Jon Harrop
2008-04-21 20:47     ` Richard Jones
2008-04-21 21:06       ` Arnaud Spiwack
2008-04-21 21:16         ` Berke Durak [this message]
2008-04-21 23:06           ` Jon Harrop
2008-05-17 22:03       ` Jon Harrop
2008-04-21 16:26   ` Elliott Oti
2008-04-21 20:48     ` Richard Jones
2008-04-21 21:06       ` Jon Harrop
2008-04-21 14:59 ` Dario Teixeira
2008-04-21 15:57   ` Berke Durak

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=b903a8570804211416p6083ea08y24c06a883d1385c8@mail.gmail.com \
    --to=berke.durak@gmail.com \
    --cc=Arnaud.Spiwack@lix.polytechnique.fr \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).