Top "Runnable" questions

The Runnable interface defines a single method, run, meant to contain the code executed in the thread.

Best way to wait for retrofit2 to finish before continuing async

I realize similar questions have been asked but I am new to android and find the answers a bit confusing …

android asynchronous runnable retrofit2 countdownlatch
Running a task at a specific time using postDelayed

I would like to start a task at a specific time. For that I use runnable and postDelayed method as …

android runnable postdelayed
Creating Jar file - doesn't work on other computers

I'm trying to package my program into a JAR file so it can be used on multiple computers. My program …

java jar executable runnable
Android - Question on postDelayed and Threads

I have a question about postDelayed. The android docs say that it adds the runnable to the queue and it …

android multithreading runnable postdelayed
Why use Thread.currentThread().isInterrupted() instead of Thread.interrupted() when implementing Runnable?

On stackoverflow, I often see the use of Thread.currentThread().isInterrupted(). When implementing Runnable and using it in a while …

java multithreading interrupt runnable
FacesContext.getCurrentInstance() returns null in Runnable class

I am trying to get the FacesContext by calling FacesContext.getCurrentInstance() in the run() method of a Runnable class, but …

jsf nullpointerexception runnable facescontext
Is this Runnable safe from memory leak?

I am a total beginner in Java and have created a simple Java Android snippet where in a Runnable after 1,5 …

java android memory-leaks runnable weak-references
nested postDelayed / Runnable / Handler Android

I am trying to use a nested postDelayed because I need to do something after (delayed for) 5 minutes, stop it …

java android runnable handlers postdelayed
Why is run() not immediately called when start() called on a thread object in java

Or is it? I have a thread object from: Thread myThread = new Thread(pObject); Where pObject is an object of …

java multithreading runnable
Androids Handler.post, what happens exactly

since several days, I tried to figure out what exactly happens if I execute code in void function(){ //somePreExecutionCode new …

android handler runnable