diff options
| author | Maxime Dénès | 2017-01-11 13:59:54 +0100 |
|---|---|---|
| committer | Maxime Dénès | 2017-01-13 12:45:41 +0100 |
| commit | 6424a49842ed9982c7edd1b847d88d66508f072b (patch) | |
| tree | 11d697858c3a4170b0a95e35488be83df5c5fead | |
| parent | 9568a34f665a6f3dca06271ffd6e914d9bd2a5ad (diff) | |
Fix race condition in STM DAG generation (in debug mode).
The same file name for .dot graphs could be used by concurrent processes.
| -rw-r--r-- | lib/system.ml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/system.ml b/lib/system.ml index 4b99de707b..1817aed1fc 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -309,6 +309,7 @@ let with_time time f x = raise e let process_id () = - if Flags.async_proofs_is_worker () then !Flags.async_proofs_worker_id - else Printf.sprintf "master:%d" (Thread.id (Thread.self ())) - + Printf.sprintf "%d:%s:%d" (Unix.getpid ()) + (if Flags.async_proofs_is_worker () then !Flags.async_proofs_worker_id + else "master") + (Thread.id (Thread.self ())) |
