-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better human-readable execution history output
- Loading branch information
1 parent
8a518dd
commit ba085b9
Showing
5 changed files
with
85 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
profile = default | ||
version = 0.24.1 | ||
version = 0.25.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Atomic = Dscheck.TracedAtomic | ||
|
||
let counter incr () = | ||
let c1 = Atomic.make 0 in | ||
let c2 = Atomic.make 0 in | ||
Atomic.spawn (fun () -> incr c1); | ||
Atomic.spawn (fun () -> | ||
incr c1; | ||
incr c2); | ||
|
||
Atomic.final (fun () -> | ||
Atomic.check (fun () -> Atomic.get c1 == 2 && Atomic.get c2 == 1)) | ||
|
||
let test_safe_counter () = | ||
Atomic.trace ~print_interleavings:true (counter Atomic.incr) | ||
|
||
let _ = test_safe_counter () |