上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页
摘要: colortriangle.vert #version 330 core layout (location = 0) in vec3 aPos; layout (location = 1) in vec3 aColor; out vec3 ourColor; uniform float xOffse 阅读全文
posted @ 2021-07-09 15:37 一拳超人的逆袭 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 顶点着色器 out vec3 Color是为了给片段着色器传参 #version 130 in vec3 VertexPosition; in vec3 VertexColor; out vec3 Color; void main() { Color = VertexColor; gl_Positi 阅读全文
posted @ 2021-07-09 10:41 一拳超人的逆袭 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 函数式接口就是只有一个方法的接口 Function 传入参数T返回参数R /** * @author wuyimin * @create 2021-07-08-22:14 * @description 函数型接口 只要是函数式接口就可以用lambda表达式简化 */ public class Dem 阅读全文
posted @ 2021-07-08 22:35 一拳超人的逆袭 阅读(78) 评论(0) 推荐(0) 编辑
摘要: BlockingQueue什么时候会用到:多线程并发处理,线程池 超时等待 同步队列 Excutors创建线程池 public class Demo01 { public static void main(String[] args) { ExecutorService executorServic 阅读全文
posted @ 2021-07-08 22:00 一拳超人的逆袭 阅读(70) 评论(0) 推荐(0) 编辑
摘要: /** * @author wuyimin * @create 2021-07-08-20:12 * @description 允许同时读,不允许同时写或者同时写和读 */ public class ReadWriteLockDemo { public static void main(String 阅读全文
posted @ 2021-07-08 20:40 一拳超人的逆袭 阅读(27) 评论(0) 推荐(0) 编辑
摘要: public class CallableTest { public static void main(String[] args) throws ExecutionException, InterruptedException { //如何启动Callable MyThread thread=ne 阅读全文
posted @ 2021-07-08 20:07 一拳超人的逆袭 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-08 14:05 一拳超人的逆袭 阅读(43) 评论(0) 推荐(0) 编辑
摘要: //java.util.ConcurrentModificationException并发修改异常 public class ListTest { public static void main(String[] args) { //解决方案一:并发下ArrayList是不安全的 Vector是安全 阅读全文
posted @ 2021-07-04 11:58 一拳超人的逆袭 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 问题一,二 //1.标准情况下,两个线程先打印发短信还是打电话 1/send 2/call 》send //2.send延迟4秒,两个线程先打印发短信还是打电话 1/send 2/call 》先等4秒再send //回答:因为有锁的存在,synchronized锁的对象是方法的调用者,因为再这个方法 阅读全文
posted @ 2021-07-03 22:45 一拳超人的逆袭 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 公平锁:十分公平,先来后到 非公平锁:可以插队(默认) Synchronized public class SaleTicketDemo01 { //并发,多线程操作同一个资源类,把资源类丢入线程就行 //lambda表达式 (参数)->{代码} public static void main(St 阅读全文
posted @ 2021-07-03 22:11 一拳超人的逆袭 阅读(42) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页