Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Thread safety in libgtmshr


  • Anonymous

    Two questions.

    1. Is the libgtmshr library thread safe?

    2. If so, are there any special considerations when running multiple threads that maybe accessing the GT.M database under the same parent process.


    Ryan Eastman

  • K.S. Bhaskar
    K.S. Bhaskar

    Ryan -

    libgtmshr is not thread-safe.  While it remains a long term goal to make it so, and we make incremental changes in that direction with each release, as of today, it is not thread safe.

    If you must run multiple threads within the same process, you should probably have one thread designated as the thread to call GT.M and route all requests through that thread.  I can't guarantee that this will work, but that is the option most likely to work.

    - Bhaskar