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
package stack; | |
import java.util.*; | |
import java.util.Stack; | |
/** | |
* Created by hasskell on 04/10/16. | |
*/ | |
public class Brackets { |
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
package race_condition; | |
/** | |
* @author Dmitrijs Lobanovskis | |
* @since 20/12/2016. | |
*/ | |
public class Counter { | |
private int count = 0; | |
private final static int TIMES = 10000; |
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
package threads; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.Phaser; | |
/** | |
* @author Dmitrijs Lobanovskis | |
* @since 20/12/2016. | |
*/ |
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
package threads; | |
import java.util.concurrent.Exchanger; | |
/** | |
* @author Dmitrijs Lobanovskis | |
* @since 13/12/2016. | |
*/ | |
public class Delivery { |
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
package threads; | |
import java.util.concurrent.CyclicBarrier; | |
/** | |
* @author Dmitrijs Lobanovskis | |
* @since 13/12/2016. | |
*/ | |
public class CrossCountry { |
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
package countDownLatch; | |
import java.util.Random; | |
import java.util.concurrent.CountDownLatch; | |
/** | |
* Created by hasskell on 27/11/16. | |
*/ | |
public class Race { |
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
package semaphore; | |
import java.util.concurrent.Semaphore; | |
/** | |
* Created by hasskell on 26/11/16. | |
*/ | |
public class CarWash { | |
private static final int SIZE = 5; |