caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Chet Murthy <murthy.chet@gmail.com>
To: Malcolm Matalka <mmatalka@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] try...finally , threads, stack-tracebacks .... in ocaml
Date: Thu, 11 Apr 2013 09:43:42 -0700	[thread overview]
Message-ID: <2418490.GrNHbtuqlg@groupon> (raw)
In-Reply-To: <87fvyxcv1i.fsf@li195-236.members.linode.com>


I'm going to answer your question, but I would note that this is sort
of immaterial.  There -will- be code that wants to use native threads
(e.g., -all- odbc code) and when you need to work with that, and do
high-concurrency things, you'll either need to come up with a complex
method of transferring work between your simulated threads (== monadic
threads) and your native threads, or you'll need to work with native
threads.  In commercial code, native threading is and has been the
rule for many years.  And if you're going to work with commercial
code, you can't afford to rewrite the world.

OK, now to your question:

In most RPC-compilers, the stubs and skeletons are written on the
assumption that on the client the calling thread will block until the
response is received.  Absent call/cc, there's no real way to change
that without changing the generated code.

--chet--

P.S. I'm not saying it's impossible.  I've hacked Thrift-generated
client code to make it usable in an "asynchronous" manner.  I just
don't have the time to go hacking the idl-compiler right now.

On Thursday, April 11, 2013 04:48:25 AM Malcolm Matalka wrote:
> Out of curiosity, in what way does Thrift impose threads?  Is it
> actually handling socket-layer stuff?


  reply	other threads:[~2013-04-11 16:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 22:16 Chet Murthy
2013-04-10 22:28 ` simon cruanes
2013-04-11  0:19   ` Francois Berenger
2013-04-10 23:35 ` Yaron Minsky
2013-04-10 23:37   ` Yaron Minsky
2013-04-11  6:36     ` Malcolm Matalka
2013-04-11  6:42       ` Chet Murthy
2013-04-11  7:11         ` Francois Berenger
2013-04-11  7:17           ` Chet Murthy
2013-04-11  8:04             ` Roberto Di Cosmo
2013-04-11  8:48         ` Malcolm Matalka
2013-04-11 16:43           ` Chet Murthy [this message]
2013-04-11 11:13         ` Thomas Gazagnaire
2013-04-11  6:25 ` Jacques-Henri Jourdan

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=2418490.GrNHbtuqlg@groupon \
    --to=murthy.chet@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=mmatalka@gmail.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).