caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Re: async networking
Date: Tue, 07 Feb 2006 15:55:25 +1100	[thread overview]
Message-ID: <1139288125.19213.36.camel@rosella> (raw)
In-Reply-To: <ds84rs$ejo$1@sea.gmane.org>

On Mon, 2006-02-06 at 19:34 +0100, Bardur Arantsson wrote:

> However, if you want very high-performance networking
> you'd be better off with something closer to the metal, i.e. something
> like a libevent wrapper 

Argg no. Libevent isn't a library, it doesn't control invert.
It is a monolithic framework. Therefore it is not very useful because
your code will no longer be composable. In particular,
there is no way to compose two such frameworks, for example
you cannot use it with an event driven GUI framework.

To quote the manpage:

"In order to process events, an application needs to call
event_dispatch(). This function only returns on error, and should
replace the event core of the application program."

Just try telling a GUI that *also* demands you use ITS 
event loop that!

The only proper way to use libevent would be to spawn the
dispatch loop inside a pthread, and use the hook functions
to communicate with your program via channels. It isn't
immediately clear this would work (libevent's single page
of documentation doesn't explain if it works when spawned
inside a pthread).

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


  reply	other threads:[~2006-02-07  4:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-05  8:52 Rick Richardson
2006-02-05 17:32 ` [Caml-list] " Gerd Stolpmann
2006-02-06 18:34   ` Bardur Arantsson
2006-02-07  4:55     ` skaller [this message]
2006-02-07 17:44       ` Bardur Arantsson
2006-02-07 18:44         ` [Caml-list] " Rick Richardson
2006-02-07 19:01         ` Gerd Stolpmann
2006-02-07 19:43           ` Bardur Arantsson
2006-02-07 20:30             ` [Caml-list] " Gerd Stolpmann
2006-02-07 20:51             ` Remi Vanicat
2006-02-07 21:29         ` Rick Richardson
2006-02-07 22:03           ` Jonathan Roewen
2006-02-08  4:18             ` Rick Richardson
2006-02-08 14:43               ` Markus Mottl
2006-02-08  4:29           ` skaller
2006-02-05 20:18 ` [Caml-list] " Pierre Etchemaïté

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=1139288125.19213.36.camel@rosella \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@yquem.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).