Created
October 12, 2017 15:06
-
-
Save grkvlt/2a62a53bc6912c0d4e5bad730a09d2d7 to your computer and use it in GitHub Desktop.
Exploring Iterated Function Systems
This file contains hidden or 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
public Runnable task(AtomicBoolean cancel, Runnable task) { | |
return () -> { | |
while (latch.get()); // Wait until latch released | |
long initial = token.get(); | |
do { | |
task.run(); | |
} while (!cancel.get() && token.get() == initial); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment