O.P. Q. for Patchou: thread-safety in plugins
This is a question for Patchou (or anyone who has a good knowledge of the internal workings of Plus)... in what way are plugins called? Specifically, do I need to take synchronization into account?
The reason I ask is because I need a global variable in my plugin. My plugin is written in Delphi, thus follows the C rules. I can declare a variable which'll work throughout the DLL, but if the plugins are called in a seperate thread it could in very rare situations lead to a horrible crash... in this case I'd either use a memory mapped file or protect the data using a critical section...
Information on which functions are called in which contexts would be nice. For example; between two calls, are we still in the same thread or is a new one created?
Thanks in advance!
|