[gme-users] Mutex for the local model

Kevin Smyth ksmyth at isis.vanderbilt.edu
Thu Mar 8 09:46:08 CST 2012


Hi Jae,

 

There is no mechanism for a mutex like this in GME.

 

To reduce the chance of a conflict, I'd recommend you do all the
processing on the main thread, e.g. by creating a hidden window and
posting messages to it or by creating a COM object and using marshaling.
Of course this can't eliminate race conditions.

 

Behavior is certainly undefined if you use GME COM objects on a
different thread (without using CoMarshalInterThreadInterfaceInStream/
CoGetInterfaceAndReleaseStream).

 

You could try using the Multi-user backend with SVN, making automated
changes in one instance of the project, and user changes in another.

 

Kevin

 

 

From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Jae
young Bang
Sent: Monday, March 05, 2012 1:22 PM
To: gme-users
Subject: [gme-users] Mutex for the local model

 

Hello,

 

I am building a GME plugin that dynamically modifies the local model
based on the information from outside.

 

The plugin basically has an extra thread that is constantly injecting
changes through BON APIs.

 

The tool works okay, but it becomes somewhat unstable when the plugin
and someone using the GME make simultaneous changes.

 

Is there a way to apply something like a mutex to protect the local
model?

 

Thank you very very much for your time! :D

 

~Jae

jaeyounb at USC.edu

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20120308/86e0013f/attachment.html 


More information about the gme-users mailing list