How does multi-threading work in Android?

前端 未结 2 1009
醉酒成梦
醉酒成梦 2021-02-19 20:18

I am trying to run 4 threads in parallel, but failing.

I have tried using synchronous wait() and notify() CyclicBarrier Thre

2条回答
  •  别那么骄傲
    2021-02-19 21:14

    1. You can run 4 different Threads, but in order get executed in parallel (simultaneously) you arch have to support it. If you have a single core cpu, the order which threads are excuted is up to the scheduler and only one thread at time will be executed
    2. The order and the timing of the execution are up to the scheduler.
    3. yes it does. You can rely both on AsyncTask or the java features (Executors eg)

提交回复
热议问题