C# (CSharp) Python.Runtime PythonEngine.AcquireLock - 11 examples found. These are the top rated real world C# (CSharp) examples of Python.Runtime.PythonEngine.AcquireLock extracted from open source projects. You can rate examples to help us improve the quality of examples.
Acquire the Python global interpreter lock (GIL). Managed code *must* call this method before using any objects or calling any methods on objects in the Python.Runtime namespace. The only exception is PythonEngine.Initialize, which may be called without first calling AcquireLock. Each call to AcquireLock must be matched by a corresponding call to ReleaseLock, passing the token obtained from AcquireLock. For more information, see the "Extending and Embedding" section of the Python documentation on www.python.org.