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
import java.util.concurrent.atomic.*; | |
import java.util.concurrent.*; | |
public class Main { | |
private static ExecutorService executor = Executors.newFixedThreadPool(2); | |
private static int iterations = 10000000; | |
public static class Runner { | |
// writes to canceled happen before a CAS on suspended | |
// reads on canceled happen after a CAS on suspended |