Vin*_*ent 1 java thread-safety java-me
Thread t1= new Thread(new Runnable() {
public void run() {
//perform Database stuff
}
});
t1.start();
initCache();//perform other Database stuff (Can this code be executed while thread 1 is running?)
Run Code Online (Sandbox Code Playgroud)
如何确保在t1完成后强制initCache方法等待?