Skip to content
This repository

Potential Deadlock fix #1317

Merged
merged 1 commit into from almost 2 years ago

1 participant

Jim Carroll
Jim Carroll
Collaborator

Well ... the deadlock is potential, not the fix.

In any case, this MAY address something to do with 12578.

Jim Carroll jimfcarroll merged commit 0b630a8 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Mar 19, 2012
Jim Carroll Fix for deadlock - fixes 12578 ddcfbb8
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 7 additions and 4 deletions. Show diff stats Hide diff stats

  1. +7 4 xbmc/interfaces/python/XBPython.cpp
11 xbmc/interfaces/python/XBPython.cpp
@@ -414,11 +414,14 @@ void XBPython::Finalize()
414 414 {
415 415 CLog::Log(LOGINFO, "Python, unloading python shared library because no scripts are running anymore");
416 416
417   - PyEval_AcquireLock();
418   - PyThreadState_Swap((PyThreadState*)m_mainThreadState);
  417 + {
  418 + CSingleExit exit(m_critSection);
  419 + PyEval_AcquireLock();
  420 + PyThreadState_Swap((PyThreadState*)m_mainThreadState);
419 421
420   - Py_Finalize();
421   - PyEval_ReleaseLock();
  422 + Py_Finalize();
  423 + PyEval_ReleaseLock();
  424 + }
422 425
423 426 #if !(defined(__APPLE__) || defined(_WIN32))
424 427 UnloadExtensionLibs();

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.