How to run my code on the specific thread?
If "the specific thread" is main ui Thread, I can do use runOnUiThread method.
But "the specific thread" is not ui Thread and "the specific thread" is not made by me.
"the specific thread" is made by some library.
But I can access "the specific thread".
Like this, Thread theSpecificThread = getThread();
How to run my code on the specific thread like runOnUiThread(new Runnable())?
You have to arrange for the thread to call it. If this thread is buried in an opaque library, doesn't call any accessible methods or events and provides no way of signaling it to do something you can get at, then I'm afraid that you have a big problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With