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