From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 8C463BBAF for ; Thu, 15 Jul 2010 17:58:25 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqkCACPNPkzRVaC0mGdsb2JhbACDH4J0jRmLXlIIFQEBAQEBCAkMBxEirUo7gg+GFS6IUwEBAwWELXIEg36EUg X-IronPort-AV: E=Sophos;i="4.55,209,1278280800"; d="scan'208";a="54296502" Received: from mail-gy0-f180.google.com ([209.85.160.180]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Jul 2010 17:58:24 +0200 Received: by gyg13 with SMTP id 13so915606gyg.39 for ; Thu, 15 Jul 2010 08:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=N0p0xJfnj5kLxNCHw79YGoOAVsQcABoZzlIduVy/LMY=; b=crYzVzmL9mPSK1Eijdb4QU3yVNg7RRhgQ4qylWMbi9Sf2CJYYvQmH1FjFCgXVcUdZv uNHbdqogccgtIgja9hd0hiF6XWQgb4rUdjRtyn6vM8/BXIdWhXPfIg5TmZ0sMYAw9Zh+ ZzEM8ck1noBgynCQ+BXq5PF3waOn657vKd+yo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=OGEKy47QQBugwfEVMD8SHsm8LQNEYSQM/8Yn7WnhORsRsr2HKua1I4CAoEQ86E76Ki q2SxEGHbs2QxTVHH53KZohLR7IvCA5lyVYd2ND98rciO5OeNhzc7OdYbskQYL/IYaSWi eO4R+0fhbO+ZfxBNyldamOGHOZvj2FtqCB2T8= MIME-Version: 1.0 Received: by 10.101.169.39 with SMTP id w39mr2048173ano.86.1279209503286; Thu, 15 Jul 2010 08:58:23 -0700 (PDT) Received: by 10.100.212.6 with HTTP; Thu, 15 Jul 2010 08:58:23 -0700 (PDT) In-Reply-To: <87sk3mcaeq.fsf@frosties.localdomain> References: <87sk3mcaeq.fsf@frosties.localdomain> Date: Thu, 15 Jul 2010 10:58:23 -0500 Message-ID: Subject: Re: [Caml-list] Smart ways to implement worker threads From: Rich Neswold To: Goswin von Brederlow Cc: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=001636c5c10a0964d1048b6f2cc1 X-Spam: no; 0.00; model:01 mutexes:01 threading:01 threading:01 ocaml's:01 contrib:01 ocaml:01 model:01 mutexes:01 ocaml's:01 ocaml:01 contrib:01 threads:01 sans-serif:98 sans-serif:98 X-Attachments: cset="UTF-8" cset="UTF-8" --001636c5c10a0964d1048b6f2cc1 Content-Type: text/plain; charset=UTF-8 On Wed, Jul 14, 2010 at 11:09 AM, Goswin von Brederlow wrote: > 4) Do some magic with Event.t? > > Problem: never used this and I could use a small example how to use > this. > Event.t (and its associated library) *is* magical in that it provides an absolutely beautiful concurrent programming model. Forget about select() and mutexes and other ugly threading concepts. Event.t and friends is how it should be done. John H. Reppy's "Concurrent Programming in ML" provides a thorough understanding of how to use this module effectively. This book presents the material in a very understandable way: deficiencies in current threading models are discussed as well as how CML solves the limitations and constraints. The book can be purchased or downloaded free online. The few applications I've written that use CML, I found it was more than sufficient (speed-wise). Whether your application is more demanding, I can't tell. Hopefully someone on the list with more experience can comment whether there are caveats (performance-related or others) in OCaml's support of CML. If there are, there should be an effort in fixing the problems (I would help in any way I could.) I'd also recommend incorporating Satoshi Ogasawara's Concurrent Cell project into the standard library. (This project adds IVars and MVars and other constructs described in John H. Reppy's book, but not available in the OCaml standard library.) Hope this helps! -- Rich Google Reader: https://www.google.com/reader/shared/rich.neswold Jabber ID: rich@neswold.homeunix.net --001636c5c10a0964d1048b6f2cc1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 14, 2010 at 11:09 AM, Goswin von Brederlow &l= t;goswin-v-b@web.de> wro= te:
4) Do some magic with Event.t?

Problem: never used this and I could use a small example how to use
this.

Event.t (and its associated libra= ry) *is* magical in that it provides an absolutely beautiful concurrent pro= gramming model. Forget about select() and mutexes and other ugly threading = concepts. Event.t and friends is how it should be done.


The few applications I've written that use CML, I f= ound it was more than sufficient (speed-wise). Whether your application is = more demanding, I can't tell.


=
Hope this helps!

=
--
Rich

Google Reader: https://www.google.com/reader/share= d/rich.neswold
Jabber ID: rich@neswold.homeun= ix.net
--001636c5c10a0964d1048b6f2cc1--