Code example for ExecutorService

Methods: submit

0
 
    @Override 
    @SuppressWarnings("deprecation") 
    public void onStart(Intent intent, int startId) {
        mHandler.removeCallbacks(mStopSelfRunnable);
        mFutureList.add(mThreadPool.submit(new IntentRunnable(intent)));
    } 
 
    @Override 
    public int onStartCommand(Intent intent, int flags, int startId) {
        onStart(intent, startId);
        return mRedelivery ? START_REDELIVER_INTENT : START_NOT_STICKY;
    } 
 
    @Override 
    public void onDestroy() { 
        super.onDestroy(); 
        mThreadPool.shutdown();
    } 
 
    /**