FileDocCategorySizeDatePackage
IoThread.javaAPI DocAndroid 5.1 API1721Thu Mar 12 22:22:42 GMT 2015com.android.server

IoThread

public final class IoThread extends ServiceThread
Shared singleton I/O thread for the system. This is a thread for non-background service operations that can potential block briefly on network IO operations (not waiting for data itself, but communicating with network daemons).

Fields Summary
private static IoThread
sInstance
private static android.os.Handler
sHandler
Constructors Summary
private IoThread()

        super("android.io", android.os.Process.THREAD_PRIORITY_DEFAULT, true /*allowIo*/);
    
Methods Summary
private static voidensureThreadLocked()

        if (sInstance == null) {
            sInstance = new IoThread();
            sInstance.start();
            sHandler = new Handler(sInstance.getLooper());
        }
    
public static com.android.server.IoThreadget()

        synchronized (IoThread.class) {
            ensureThreadLocked();
            return sInstance;
        }
    
public static android.os.HandlergetHandler()

        synchronized (IoThread.class) {
            ensureThreadLocked();
            return sHandler;
        }