信号灯解决同步问题 我尽量注释了代码,可以很容易理解了. package Thread; /** * 信号灯 * 借助标志位 */ public class FlagThread { public static void main(String[] args) { Bread bread=new Bread(); new Producer(bread).start(); new Consume(bread).start(); } } class Consume extends Thread{ B
/proc/sysrq-trigger该文件能做些什么事情呢? # 立即重新启动计算机 (Reboots the kernel without first unmounting file systems or syncing disks attached to the system)echo "b" > /proc/sysrq-trigger # 立即关闭计算机(shuts off the system)echo "o" > /proc/sysrq-tr