Java在我的情况下等待或睡眠

时间:2015-12-19 07:17:46

标签: java android wait thread-sleep

等待或睡觉......哪种方法适合?

void A()
{
    //Some Code 1

    some_function(); // calling a method and will seek for a response from other device, communicating on bluetooth
    //Some code 2
}

我希望我的程序等待some_function()的进程。但是,此刻它开始执行函数A()的“Some Code 2”部分。

并且如果有人指定等待方法实现我的情况。

p.s:Async不是我的首选。

0 个答案:

没有答案
相关问题