Example #1
0
 def unload_mnemosyne(self):
     # Close Mnemosyne and its database in the review server thread.
     self.close_progress()
     mutex.lock()
     server_had_connection = self.server_has_connection
     if self.server_has_connection:
         WebServer.unload_mnemosyne(self)
         self.server_has_connection = False
         database_released.wakeAll()
     if self in self.component_manager.components[None]["main_widget"]:
         self.component_manager.components[None]["main_widget"].pop()
     mutex.unlock()
     if server_had_connection:
         # Reload database in the main program.
         self.review_ended_signal.emit()
Example #2
0
 def unload_mnemosyne(self):
     # Close Mnemosyne and its database in the review server thread.
     self.close_progress()
     mutex.lock()
     server_had_connection = self.server_has_connection
     if self.server_has_connection:
         WebServer.unload_mnemosyne(self)
         self.server_has_connection = False
         database_released.wakeAll()
     if self in self.component_manager.components[None]["main_widget"]:
         self.component_manager.components[None]["main_widget"].pop()
     mutex.unlock()
     if server_had_connection:
         # Reload database in the main program.
         self.review_ended_signal.emit()