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 533511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:30:58+00:00 2026-05-13T09:30:58+00:00

I am using a library (written in C) that is not reentrant(i.e no function

  • 0

I am using a library (written in C) that is not reentrant(i.e no function in the library is reentrant). Suppose I have loaded the library via System.load to get the handle say ‘v’. I cannot use v in two threads because of the reentrancy issues (tried but nonsense results). I could use locks, but that defeats any parallelism i could have gained.

What I’d like to do is start two threads, and in each thread load the library to get two different handles(thus there are two copies of the loaded library).

Is this possible in Java?
Regards
Saptarshi

  • 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-05-13T09:30:58+00:00Added an answer on May 13, 2026 at 9:30 am

    Any DLL can be loaded only once by a process, so I don’t think you can achieve what you want. You could cheat and rename the DLL to a different name maybe?

    Your threads spend so much time in the DLL that there is no other parallelism to be had?

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

Sidebar

Related Questions

I have an ActiveX control written using the MS ATL library and I am
I have a COM object written using the MS ATL library. I have declared
I am trying to load a dynamic library using dlopen function. This library contains
I am using a library that has headers without the .h This defeats visual
I was using mysql++ library and compiling with GCC 3.3.4. That GCC version had
I have got this error when using Enterprise Library 3.1 May 2007 version. We
In C#, I am using a library that defines an enum. I would like
I am using Enterprise Library 4.0 and I can't find any documentation on creating
What's pros and cons of using Enterprise Library Unity vs other IoC containers (Windsor,
I'm trying to build a C/C++ static library using visual studio 2005. Since the

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.