Skip to content

Commit 429416b

Browse files
committed
Fixed end experiment race condition
1 parent c10f765 commit 429416b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Assets/ExpMngr/Scripts/ExperimentSession.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,9 @@ void SaveResults()
429429
List<OrderedResultDict> results = trials.Select(t => t.result).ToList();
430430
string fileName = "trial_results.csv";
431431
string filePath = Path.Combine(sessionPath, fileName);
432-
fileIOManager.Manage(new System.Action(() => fileIOManager.WriteTrials(results, filePath)));
432+
433+
// in this case, write in main thread to block aborting
434+
fileIOManager.WriteTrials(results, filePath);
433435
}
434436

435437
/// <summary>

0 commit comments

Comments
 (0)