2021
05-23
05-23
Java多线程之简单模拟售票功能
一、创建二、完整代码packagecom.ql;importlombok.SneakyThrows;importokhttp3.Call;importokhttp3.OkHttpClient;importokhttp3.Request;importokhttp3.Response;importjava.io.IOException;publicclassMythreadextendsThread{publicMythread(Stringname){super(name);}@SneakyThrows@Overridepublicvoidrun(){for(;;){//锁的状态是默认是打开状态...
继续阅读 >