English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Automatic wrapper generator
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-18 (20:13)
From: SWAMPY <swampy@s...>
Subject: [Caml-list] Functional critical section

   I'm very new to ocaml, and I'm trying to figure out how
to do something that may or may not actually be possible.
Any suggestions?

    I'd like to write

        <name> <expr>

    as an expression, and have this evaluate <expr> first
evaluating fixed expression A, and then after evaluting
<expr> evaluate fixed expression B.
    Then, I could do something like:

    critical (threadsafeFunction arg1 arg2 arg3)

    and have this do the equivalent of

    Mutex.lock someMutex; let tmp = threadsafeFunction arg1
arg2 arg3; Mutex.unlock someMutex; tmp;;

    Is this sort of thing possible?  In general I'm
interested in techniques I could use to wrap
imperative-biased parts of the library to more functional


    David J. Trombley

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