Hi list,

I've been using OB in a multithreaded environment for a while, and a
common headache comes from the abundance of singleton classes in OB,
namely for error handling/logging. If two concurrent threads call two
OB functions and the logging functions are accessed at the same time,
the application crashes. Would it be possible to move the error
handling out of a singleton class, or add a mutex to ensure that these
are not accessed simultaneously?

I have attempted to correct this by implimenting a mutex that gets
locked for the duration of the offending OB calls, but this is a less
than ideal solution. Many of the OB functions can take a noticable
amount of time to complete, while the singletons are only used for a
few cycles of that time. This makes the application unneccesarily

Has anyone else run into this? Any other thoughts?

Dave

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to