self._lockFile = "{}.lock".format( os.path.splitext( os.path.basename(xmlfilename) )[0] )
def __enter__(self):
logging.info(f"Ready to launch thread of state dump with dumpFile = {self._dumpFile} lockFile = {self._lockFile}")
- self._dump_thread = SALOMERuntime.ThreadDumpState(proc,dump,dumpFile,lockFile)
+ self._dump_thread = SALOMERuntime.ThreadDumpState(proc,dump,self._dumpFile,self._lockFile)
self._dump_thread.start()
def __exit__(self,exctype, exc, tb):
self._dump_thread.join()
#
salome.cm.SetDeltaTimeBetweenCPUMemMeasureInMilliSecond( 1000*CPUMemContainerTimeRes )
# Start part of context manager instances
- ctxManagers = MonitoringDirectories( DirectoriesToMonitor ) + MonitoringThisProcess(HTopOfThisProcessFile, HTopTimeRes) + MonitoringAllKernelServers(HTopOfAllServersFile, HTopOfAllServersTimeRes)
+ ctxManagers = [ AutoShutdown(proc,shutdown) ] # the first one must be this one. Because orb.shutdown must be called last !
+ #
+ ctxManagers += MonitoringDirectories( DirectoriesToMonitor ) + MonitoringThisProcess(HTopOfThisProcessFile, HTopTimeRes) + MonitoringAllKernelServers(HTopOfAllServersFile, HTopOfAllServersTimeRes)
#
if dump != 0:
ctxManagers += [ AutoDumpThread(proc,dump,xmlfilename) ]
- #
- ctxManagers += [ AutoShutdown(proc,shutdown) ]
# end of part of context managers
with contextlib.ExitStack() as stack:
for mgr in ctxManagers: