简体   繁体   中英

Parellelize a thread execution in Java

What I´m trying to do is best explained with the next imagen.

说明

So I want to create a new thread to call the method send mail (T2) in the same time that the original thread (T1) finish the method execution and return the boolean.

I tried to do this, but It´s doesn´t work. I don´t know what I´m doing wrong.

Thanks in advance.

您需要通过调用sendEmailThread.start();启动线程sendEmailThread.start();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM