Ticket12306LockTest.java 506 字节
Newer Older
1 2
package com.kwan.shuyu;

3

4 5
import com.kwan.shuyu.entry.Ticket12306;

6 7 8 9 10 11 12 13
/**
 * InterProcessMutex 分布式锁测试
 *
 * @author : qinyingjie
 * @version : 2.2.0
 * @date : 2023/5/15 09:53
 */
public class Ticket12306LockTest {
14 15 16 17 18 19 20 21 22
    public static void main(String[] args) {
        Ticket12306 ticket12306 = new Ticket12306();
        //创建客户端
        Thread t1 = new Thread(ticket12306, "携程");
        Thread t2 = new Thread(ticket12306, "飞猪");
        t1.start();
        t2.start();
    }
}