MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / callSerially

Method callSerially

CodenameOne/src/com/codename1/ui/Display.java:798–811  ·  view source on GitHub ↗
(Runnable r)

Source from the content-addressed store, hash-verified

796 /// - `r`: @param r runnable (NOT A THREAD!) that will be invoked on the EDT serial to
797 /// the paint and key handling events
798 public void callSerially(Runnable r) {
799 // otherwise this will fail in an odd locaiton. Better it fails here...
800 if (r == null) {
801 throw new NullPointerException();
802 }
803 if (codenameOneRunning) {
804 synchronized (lock) {
805 scheduleSerialCall(isEnableAsyncStackTraces() ? new DebugRunnable(r) : r);
806 lock.notifyAll();
807 }
808 } else {
809 r.run();
810 }
811 }
812
813 // We factor out the scheduling of a serial call so that we can
814 // use the Schedule annotation for IntelliJ async debugging https://www.jetbrains.com/help/idea/debug-asynchronous-code.html

Callers 10

runOnEdtMethod · 0.95
pointerWheelMovedMethod · 0.95
callSeriallyAndWaitMethod · 0.95
mainEDTLoopMethod · 0.95
setCurrentMethod · 0.95
fireWindowEventMethod · 0.95
postureChangedMethod · 0.95
onResultMethod · 0.95
dispatchKeyPressMethod · 0.95
dispatchPointerDragMethod · 0.95

Calls 4

scheduleSerialCallMethod · 0.95
runMethod · 0.65
notifyAllMethod · 0.45

Tested by 2

dispatchKeyPressMethod · 0.76
dispatchPointerDragMethod · 0.76