>> I'm writing an extension in C++. The extension uses global variables, but >> doesn't create threads. Since OpenOffice.org is multithreaded, can race >> conditions and other threading problems occur with my global variables ? > > Yes, your C++ implementation should be written in such a way that the > interface methods of the UNO API it implements can be called by > arbitrary threads, in arbitrary patterns.
Using the ":affine" suffix in component_getImplementationEnvironment (see http://hg.services.openoffice.org/DEV300/file/f387649cb501/connectivity/source/drivers/ado/Aservices.cxx#l121 for an example) should ensure that the UNO runtime takes care of this, right? Means that every call into such a component would happen in the same thread ... Ciao Frank -- - Frank Schönheit, Software Engineer [email protected] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Impress http://graphics.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
