61
Technical forum / Indivisibility of function's calls of a plug-in
« on: August 07, 2010, 11:38:23 AM »
Hi,
I'm wondering whether calling of a function/method of a plug-in from a script is indivisible or not.
Maybe it will be better if I show you an example.
Let's suppose there are a method A and a method B in a plug-in.
The methods share a data set (for example two variables).
The method A modifies the data set and the method B reads that data set.
The method A is called in a game main loop and the method B is called when a LeftClick event is trigged.
And now suppose this situation:
The loop has got in the method A and the method has started doing its job.
However, a LeftClick event is trigged during its job.
So, the method B should be called.
I need to have guaranteed that the method B won't be called until the method A has finished its job.
Does WME guaranteed that thing?
I haven't found that information in the documentation but I think it's an important information for developing a plug-in.
I hope I've explained the problem in the understandable way.
Thanks for replies
I'm wondering whether calling of a function/method of a plug-in from a script is indivisible or not.
Maybe it will be better if I show you an example.
Let's suppose there are a method A and a method B in a plug-in.
The methods share a data set (for example two variables).
The method A modifies the data set and the method B reads that data set.
The method A is called in a game main loop and the method B is called when a LeftClick event is trigged.
And now suppose this situation:
The loop has got in the method A and the method has started doing its job.
However, a LeftClick event is trigged during its job.
So, the method B should be called.
I need to have guaranteed that the method B won't be called until the method A has finished its job.
Does WME guaranteed that thing?
I haven't found that information in the documentation but I think it's an important information for developing a plug-in.
I hope I've explained the problem in the understandable way.
Thanks for replies