11-11-2013, 03:54 PM
This is probably a more general QM programming question.
I have a CsScript which has multiple C# methods to invoke different times over the life of the program (which may be running for many hours). I believe that the C# calls themselves are thread safe. What is the best way to keep this persistent and how to make this available for other threads to invoke?
I could make a wrapper class that wrapped the CsScript - I'd make a singleton instance of this QM class and make a it a global to be accessed by other threads. This would be very simple - but is it safe? I read somewhere in the documentation that some COM pointers shouldn't be passed between threads - I don't know what the rules are for CsScript within QM.
I have a CsScript which has multiple C# methods to invoke different times over the life of the program (which may be running for many hours). I believe that the C# calls themselves are thread safe. What is the best way to keep this persistent and how to make this available for other threads to invoke?
I could make a wrapper class that wrapped the CsScript - I'd make a singleton instance of this QM class and make a it a global to be accessed by other threads. This would be very simple - but is it safe? I read somewhere in the documentation that some COM pointers shouldn't be passed between threads - I don't know what the rules are for CsScript within QM.