Home | 简体中文 | 繁体中文 | 杂文 | 打赏(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎专栏 | Search | Email

1.10. Thread 线程

1.10.1. 实现异步执行

		
	public void testThread() throws Exception {
		try {
			Thread sendmail = new Thread(new Runnable() {
				@Override
				public void run() {
					// Sendmail
					log.info("Sendmail OK");
				}
			});
			sendmail.setName("sendmail");
			sendmail.start();
		} catch (Exception e) {
			e.printStackTrace();
		}	
	}				
		
		

1.10.2. 

		
		
		

1.10.3.