java多线程    Java入门    vsftp    ftp    linux配置    centos    FRP教程    HBase    Html5缓存    webp    zabbix    分布式    neo4j图数据库    

java多线程,让步yield

[seriesposts sid=500] 先看个yield让步的例子 package com.javaer.thread; public class YThread implements Runnable { private Object obj = new Object(); /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub YThread s = new YThread(); Thread t1 = new Thread(s, "Thread More