Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8168615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:35:07+00:00 2026-06-06T20:35:07+00:00

I have been writing a SOAP client application in C++ on Ubuntu using OpenSSL

  • 0

I have been writing a SOAP client application in C++ on Ubuntu using OpenSSL for my HTTPS transport and pthreads for threading. I have a number of threads – one central data acquisition thread which periodically gets worker threads to make SOAP requests via shared mutex protected queues.

Reading the documentation for OpenSSL I found Is OpenSSL thread-safe? in the OpenSSL FAQ which describes the mechanisms required to ensure thread safety when using OpenSSL. I implemented this and all works fine.

The reason for my question is a conceptual difficulty really. I was thinking about implementing the same functionality that my application has already, but instead of using threads, I would create 2 seperate applications : One for the worker thread (of which multiple copies would be running) and another for the main data acquisition thread. I would then use TCP sockets to communicate between the two rather than mutex protected queues. This may be a bad idea but that is not really important – what is confusing me is would I have to implement the same functions required to ensure OpenSSL thread safety in this second approach or not?

My guess is that I would not have to and they could be treated as independent (indeed surely it must be as so many applications use OpenSSL) but what is the reason for it?? What is different between multiple applications using shared library code and multiple threads sharing the same code?? I have been writing multithreaded applications successfully for a couple of years now and it concerns me that I cannot come up with an answer to this question.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:35:09+00:00Added an answer on June 6, 2026 at 8:35 pm

    The difference is that when multiple threads share the same library code, they also share the same global data structures; when multiple processes share that library code, they don’t.

    For example, many of the cryptographic algorithms in OpenSSL are faster if they have a large precalculated table available. This table is shared between multiple threads calling the same OpenSSL functions, but locking must be used to ensure that only one thread attempts to initialise the table on first use.

    As another example, many OpenSSL functions internally access the random number generator, but the state of this is a global data structure that must have its accessed synchronised across threads.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been writing an application using ASP.Net MVC4, where the majority of the
I have been writing a small application using C# to copy a document into
I have been writing unit tests using NUnit and Moq with my Silverlight code
I have been writing a GUI application for rsync on Windows and I have
I have been writing a small web application in C# .NET4.0 to try and
I have been writing my Rails application with Cucumber in TDD mode: Tests first,
I have been writing this Android application for the past few days and everything
I have been writing a browser based application (or rather, rapid prototyping an application)
I have been writing a new version of my application in WPF. It looks
I have been writing apps for my Droid x2 using the new Android update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.