File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -423,22 +423,25 @@ void OREApp::run() {
423423void OREApp::run (const std::vector<std::string>& marketData,
424424 const std::vector<std::string>& fixingData) {
425425
426- // only one thread at a time should call run
426+ // Only one thread at a time should call run
427427 static std::mutex _s_mutex;
428428 std::lock_guard<std::mutex> lock (_s_mutex);
429429
430- // clean up after finishing the run
431- CleanUpThreadLocalSingletons cleanupThreadLocalSingletons;
432- CleanUpThreadGlobalSingletons cleanupThreadGloablSingletons;
433- CleanUpLogSingleton cleanupLogSingleton (true , true );
430+ // Clean start, but leave Singletons intact after run is completed
431+ {
432+ CleanUpThreadLocalSingletons cleanupThreadLocalSingletons;
433+ CleanUpThreadGlobalSingletons cleanupThreadGloablSingletons;
434+ CleanUpLogSingleton cleanupLogSingleton (true , true );
435+ }
434436
435- if (inputs_ == nullptr )
436- initFromParams ();
437- else if (params_ == nullptr )
437+ // Use inputs when available, otherwise try params
438+ if (inputs_ != nullptr )
438439 initFromInputs ();
440+ else if (params_ != nullptr )
441+ initFromParams ();
439442 else {
440443 ALOG (" both inputs are empty" );
441- return ;
444+ return ;
442445 }
443446
444447 runTimer_.start ();
You can’t perform that action at this time.
0 commit comments