![](https://i-blog.csdnimg.cn/blog_migrate/7599aa9ac6163e26845069964d4a76b0.png)
![](https://i-blog.csdnimg.cn/blog_migrate/b20d39f67ca6a25f6f16ae8035e7a0ac.png)
![](https://i-blog.csdnimg.cn/blog_migrate/a954d04485fe73263828428d04645e9e.png)
快捷键 | 说明 |
---|
trycf | 异常处理 |
tsleep | 线程睡眠2秒 |
log | log日志 |
newt | 创建线程 |
trylock | lock锁 |
tryreadlock | 读锁 |
trywritelock | 写锁 |
// trycf
try {
$END$
} catch (Exception e) {
e.printStackTrace();
} finally {
}
// newt
new Thread(() -> {
$END$
},$VAR$).start();
// trylock
lock.lock();
try {
$END$
} catch (Exception e) {
e.printStackTrace();
} finally {
lock.unlock();
}
// tsleep
try {
TimeUnit.SECONDS.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
// tryreadlock
rwLock.readLock().lock();
try {
$END$
} catch (Exception e) {
e.printStackTrace();
} finally {
rwLock.readLock().unlock();
}
// trywritelock
rwLock.writeLock().lock();
try {
$END$
} catch (Exception e) {
e.printStackTrace();
} finally {
rwLock.writeLock().unlock();
}