caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mike Lin <mlin@mlin.net>
To: Gerd Stolpmann <info@gerd-stolpmann.de>,
	ocamlnet-devel@lists.sourceforge.net,
	 "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] Multithreaded https requests in ocamlnet netclient
Date: Mon, 26 Nov 2012 18:54:16 -0800	[thread overview]
Message-ID: <CADxsieavhmvdJAL+3Wk9Dfyrb-dW49reNFoxcZHwKYvC4RabzA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 825 bytes --]

Hello Gerd, all,

I'm trying to find the right incantations to make parallel https requests
from multiple threads using Http_client. (I know the library is capable of
multiple requests from one thread -- I have other strong reasons to use
multithreading.)

https://gist.github.com/4152047

This program generally segfaults for me at some random point during the 10
requests.  Compiled as in the comment in line 2 (ubuntu quantal,
libocamlnet-ocaml-dev 3.5.1, ocaml 3.12.1).

Permutations attempted:

1) Change https to http in google URL -- works as expected
2) Serialize requests by uncommenting line 35 -- works as expected
3) Move invocations of Ssl.init, Ssl.create_context,
HTTPS.https_transport_channel_type in and out of fresh_pipeline (which runs
in the worker threads) -- no help

Any suggestions? Thanks!

Mike Lin

[-- Attachment #2: Type: text/html, Size: 1099 bytes --]

             reply	other threads:[~2012-11-27  2:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  2:54 Mike Lin [this message]
2012-11-27 13:03 ` [Caml-list] AW: " Gerd Stolpmann
2012-11-28  1:43   ` [Caml-list] " Mike Lin
2013-09-26  8:34     ` [Caml-list] " Török Edwin

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=CADxsieavhmvdJAL+3Wk9Dfyrb-dW49reNFoxcZHwKYvC4RabzA@mail.gmail.com \
    --to=mlin@mlin.net \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    --cc=ocamlnet-devel@lists.sourceforge.net \
    /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).