| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 70e2e0a commit a49f3a8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -355,12 +355,17 @@ public static void Shutdown() | |||
| 355 | 355 | { | |
| 356 | 356 | return; | |
| 357 | 357 | } | |
| 358 | - if (Exceptions.ErrorOccurred()) | ||
| 358 | + | ||
| 359 | + using (Py.GIL()) | ||
| 359 | 360 | { | |
| 360 | - throw new InvalidOperationException( | ||
| 361 | - "Python error indicator is set", | ||
| 362 | - innerException: PythonException.PeekCurrentOrNull(out _)); | ||
| 361 | + if (Exceptions.ErrorOccurred()) | ||
| 362 | + { | ||
| 363 | + throw new InvalidOperationException( | ||
| 364 | + "Python error indicator is set", | ||
| 365 | + innerException: PythonException.PeekCurrentOrNull(out _)); | ||
| 366 | + } | ||
| 363 | 367 | } | |
| 368 | + | ||
| 364 | 369 | // If the shutdown handlers trigger a domain unload, | |
| 365 | 370 | // don't call shutdown again. | |
| 366 | 371 | AppDomain.CurrentDomain.DomainUnload -= OnDomainUnload; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments