Exemplo n.º 1
0
 def finallyProcess(self, _edObject=None):
     """
     after processing of the plugin:
     Release a CPU resource by releasing the semaphore
     """
     EDPlugin.finallyProcess(self, _edObject)
     EDVerbose.DEBUG("Release semaphore nbCPU by plugin %s, currently value: %s" % (self.getPluginName(), EDUtilsParallel.getSemaphoreValue()))
     EDUtilsParallel.semaphoreNbThreadsRelease()
     EDPlugin.finallyProcess(self, _edObject)
Exemplo n.º 2
0
 def preProcess(self, _edObject=None):
     """
     preProcess of the plugin:
     Ensure a CPU resource is available for the processing by acquiring a semaphore
     """
     EDVerbose.DEBUG("Acquire semaphore nbCPU by plugin %s, currently value: %s" % (self.getPluginName(), EDUtilsParallel.getSemaphoreValue()))
     EDUtilsParallel.semaphoreNbThreadsAcquire()
     EDPlugin.preProcess(self, _edObject)