caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Luca Pascali <luca@barettadeit.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Mutex and posix
Date: Mon, 17 Jan 2005 13:33:30 +0100	[thread overview]
Message-ID: <41EBB09A.6080803@barettadeit.com> (raw)
In-Reply-To: <41E957C5.6050808@barettadeit.com>

Alex Baretta wrote:

> Luca Pascali wrote:
>
>> Just a little question, my curiosity about the thread module.
>>
>> I found in Posix (this is from 'info libc' page on section Mutexes) 
>> these three functions
>>
>> Function: int pthread_mutex_lock (pthread_mutex_t *mutex))
>> Function: int pthread_mutex_trylock (pthread_mutex_t *MUTEX)
>> Function: int pthread_mutex_timedlock (pthread_mutex_t *MUTEX, const 
>> struct timespec *ABSTIME)
>
>
> You can probably simulate the third one fairly well by resorting to 
> Unix.select as a timer, but why in the world would you want to lock 
> for a while and then forget about it?
>
> Besides --- given Machiavelli works in an asynchronous, event-modeled 
> world --- why would want to use synchronous primitives such as timedlock?
>
> Alex
>
>

It's not about Machiavelli. It was just a curiosity (We spoken 
personally a few months ago).
I staied with the doubt about the missing of this function and I thought 
that asking to the list was the best thing to do for having an answer. 
And it was.

Luca

-- 
*********************************************************************
Luca Pascali
luca@barettadeit.com
asxcaml-guru@barettadeit.com

http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. 02 370 111 55
fax. 02 370 111 54

Our technology:
http://www.asxcaml.org/
http://www.freerp.org/


      parent reply	other threads:[~2005-01-17 12:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-12 10:53 Luca Pascali
2005-01-12 15:56 ` [Caml-list] " Xavier Leroy
2005-01-12 17:29   ` Luca Pascali
2005-01-15 17:53     ` Alex Baretta
2005-01-15 17:49 ` Alex Baretta
2005-01-15 19:37   ` Brian Hurt
2005-01-17  8:52     ` Alex Baretta
2005-01-19  3:31       ` Brian Hurt
2005-01-19  9:34         ` Alex Baretta
2005-01-17 12:33   ` Luca Pascali [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=41EBB09A.6080803@barettadeit.com \
    --to=luca@barettadeit.com \
    --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).