原文摘自:https://www.jianshu.com/p/d48f854ead85 1.中断后LockSupport.park()直接返回 public class MultInterruptParkDemo { public static volatile boolean flag = tru ...
分类:
其他好文 时间:
2020-01-16 14:44:24
阅读次数:
127
在Linux Kernel中某些特定含义的函数命令有自己的规律,比如这里将简单的介绍一下函数名前双下划线__和devm_xxx函数的意思。 函数名称前的双下划线__ 标记需要加锁: 在内核中,有很多函数,有的是需要调用者自己加锁保护的,有些是不需要加锁保护的。对于这些场景,linux kernel采 ...
分类:
系统相关 时间:
2020-01-15 11:55:29
阅读次数:
107
import java.util.ArrayList; import java.util.List; /** * Given an array nums of n integers and an integer target, are there elements * a, b, c, and d ...
分类:
其他好文 时间:
2020-01-12 15:29:51
阅读次数:
121
1. 继承Thread类,重写run方法 2. 实现Runnable接口,重写run方法,实现Runnable接口的实现类的实例对象作为Thread构造函数的target 3. 通过Callable和FutureTask创建线程 4. 通过线程池创建线程 前面两种可以归结为一类:无返回值,原因很简单 ...
分类:
编程语言 时间:
2020-01-11 00:28:25
阅读次数:
97
class MyResource { private volatile boolean FLAG = true; //默认开启,进行生产+消费 private AtomicInteger atomicInteger = new AtomicInteger(); BlockingQueue<Strin ...
分类:
编程语言 时间:
2020-01-06 00:36:19
阅读次数:
108
一、等待队列 在linux内核中提供了阻塞机制,等待队列(wait queque)。在驱动中使用的也比较多。例如,应用程序去读取设备上的数据时,如果设备还没有准备好数据,可以将这个进程挂起,进入阻塞状态。等到设备准备好数据时才将这个进程唤醒,并且将数据返回给应用程序,继续执行。阻塞进程的实现方法就使 ...
分类:
系统相关 时间:
2020-01-05 22:50:15
阅读次数:
168
CVE-2019-6339 Date 2019 类型 后台getshell 影响范围Drupal Core versions 7.x prior to 7.62, 8.6.x prior to 8.6.6 and 8.5.x prior to 8.5.9 前置条件 前台管理员账号 -》 登录前台 复 ...
分类:
其他好文 时间:
2020-01-02 18:47:47
阅读次数:
106
即使子线程休眠了,也不去抢cpu资源,等子线程做完了主线程再做; public class Test5 { public static void main(String[] args) { MyRunnable2 r = new MyRunnable2(); Thread t = new Threa ...
分类:
其他好文 时间:
2019-12-29 15:06:59
阅读次数:
61
从vue转战react了,今天介绍下第一次用到taro的一个介绍, 1、首页要利用小程序的分包subPackages进行设置,首次加载不要太多 配置 1 config: Config = { 2 pages: [ 3 'pages/home/index',//首页 4 'pages/mine/ind ...
分类:
其他好文 时间:
2019-12-27 11:40:06
阅读次数:
175
1、查询index1中content字段包含工厂的文档 @Test public void testMatch() throws IOException, InterruptedException, ExecutionException { //指定集群 Settings settings = Se ...
分类:
编程语言 时间:
2019-12-23 00:37:12
阅读次数:
88