Called on an "arbitrary thread"

@param surfaceTexture the SurfaceTexture initiating the call
162565
@Override
    public void onFrameAvailable(SurfaceTexture surfaceTexture) {
        // Pass SurfaceTexture to Encoding thread via Handler
        // Then Encode and display frame
        mHandler.sendMessage(mHandler.obtainMessage(MSG_FRAME_AVAILABLE, surfaceTexture));
    }
1274473
void send(final InterfaceFeature feature, final byte... featureValue)
		throws KNXConnectionClosedException, KNXAckTimeoutException, InterruptedException {
		synchronized (lock) {
			final TunnelingFeature set = TunnelingFeature.newSet(channelId, getSeqSend(), feature, featureValue);
			send(set);
		}
	}
717538
public void registerThread(StoppableThread thread)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "registerThread", thread);
      
    synchronized (this)
    {
      _threadCache.add(thread);
    } 
    
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "registerThread");   
  }
39415
public void setTexture(final int bitmapId) {
        if (bitmapId < 0)
            return;

        final GVRAndroidResource resource = new GVRAndroidResource(
                mContext.getContext(), bitmapId);
        setTexture(mContext.getAssetLoader().loadTexture(resource));
    }
369114
public void setTextureSize(int width, int height) {
		setPreferredSize(new Dimension(width, height));
		setSize(new Dimension(width, height));
		this.width = width;
		this.height = height;
	}
546294
private void runInMainThread(Runnable runnable) {
        if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
            mHandler.post(runnable);
        } else {
            runnable.run();
        }
    }
865573
public static void call(Runnable task) {
        try {
            call(() -> {
                task.run();
                return true;
            });
        } catch (Exception e) {
            // It's safe to throw unsafely here because the Callable we passed never throws a checked exception.
            Exceptions.throwUnsafely(e);
        }
    }
295733
public static void doOnMainThread(final OnMainThreadJob onMainThreadJob) {
        uiHandler.post(new Runnable() {
            @Override
            public void run() {
                onMainThreadJob.doInUIThread();
            }
        });
    }
1113040
public void scheduleThread(JMeterThread thread) {
       if(System.currentTimeMillis()-tgStartTime > TOLERANCE) {
           tgStartTime = System.currentTimeMillis();
       }
       scheduleThread(thread, tgStartTime);
    }
1138160
void afterWrite(Runnable task) {
    if (buffersWrites()) {
      for (int i = 0; i < WRITE_BUFFER_RETRIES; i++) {
        if (writeBuffer().offer(task)) {
          scheduleAfterWrite();
          return;
        }
        scheduleDrainBuffers();
      }

      // The maintenance task may be scheduled but not running due to all of the executor's threads
      // being busy. If all of the threads are writing into the cache then no progress can be made
      // without assistance.
      try {
        performCleanUp(task);
      } catch (RuntimeException e) {
        logger.log(Level.SEVERE, "Exception thrown when performing the maintenance task", e);
      }
    } else {
      scheduleAfterWrite();
    }
  }
28446
public void runnable(Runnable runnable) {
		initStartTotal();
		long startInvokation = System.currentTimeMillis();
		runnable.run();
		invoked(System.currentTimeMillis() - startInvokation);
	}
565295
void afterWrite(Runnable task) {
        writeBuffer.add(task);
        drainStatus.lazySet(REQUIRED);
        tryToDrainBuffers();
        notifyListener();
    }
256990
public void setSurfaceId(int surfaceId)
    {
        Check.superiorOrEqual(surfaceId, 0);
        this.surfaceId = Integer.valueOf(surfaceId);
        if (surfaces.containsKey(this.surfaceId))
        {
            nextSurface = surfaces.get(this.surfaceId);
        }
        else
        {
            throw new LionEngineException(ERROR_SURFACE_ID + surfaceId);
        }
    }
1111054
@Override
    synchronized public void surfaceCreated(SurfaceHolder holder) {
        Log.d(TAG, "surfaceCreated called = " + currentState);

        if (this.mediaPlayer != null) {
            this.mediaPlayer.setDisplay(surfaceHolder);

            // If is not prepared yet - tryToPrepare()
            if (!this.surfaceIsReady) {
                this.surfaceIsReady = true;
                if (this.currentState == State.INITIALIZED ||
                        this.currentState == State.PREPARING)
                    tryToPrepare();
            }
        }
    }
481435
private static <T> ThreadContext<T> getCurrentThreadContext(ThreadContext<T> threadContext)
    {
        return ((ThreadContextImpl<T>) threadContext).get();
    }
11004
public static void showOnUiThread(Context applicationContext, String message, int duration) {
        Handler handler = HandlerUtils.getMainHandler();
        showOnUiThread(applicationContext, message, duration, handler);
    }
150973
@SuppressWarnings("unchecked")
    void initThreadContext(WSContextService contextSvc, Map<String, String> execProps) {
        threadContext = contextSvc.captureThreadContext(execProps);
    }