caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
To: rick@eltopia.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Re: async networking
Date: Wed, 8 Feb 2006 11:03:31 +1300	[thread overview]
Message-ID: <ad8cfe7e0602071403ye083c14od99025f6891d8075@mail.gmail.com> (raw)
In-Reply-To: <1139347775.10092.6.camel@localhost.localdomain>

> The multiple serving threads could actually make for an simple api,
> actually. A simple function to add a receive callback for a port would
> be all you'd need. You could even pass in a buffer to that callback that
> a person could respond directly to for socket send, since the same
> thread is handling the send requests as well.

I haven't checked the systhreads implementation (as I don't use it),
but if it's anything similar to the vmthreads implementation, it is
not very high performance.

For example: to reschedule a thread, vmthreads a) uses select (not
sure if this is a problem), and b) does a linear search for a runnable
thread (I can't remember if it stops early, I'd have to have another
check).

The point is, in this case, you'd need to rewrite it to use thread
queues for the various states to get something closer to an O(1)
scheduler.

Jonathan


  reply	other threads:[~2006-02-07 22:03 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     ` [Caml-list] " skaller
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 [this message]
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=ad8cfe7e0602071403ye083c14od99025f6891d8075@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=rick@eltopia.com \
    /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).