Explorar o código

NullContext thread safety

The fields `timeThen` and  `timeLate` are static. If multiple Applications are launched in different threads in headless mode, sync fails. This can be fixed removing the static modifier of the fields.
Rafael Pax %!s(int64=8) %!d(string=hai) anos
pai
achega
543268593b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      jme3-core/src/main/java/com/jme3/system/NullContext.java

+ 2 - 2
jme3-core/src/main/java/com/jme3/system/NullContext.java

@@ -96,8 +96,8 @@ public class NullContext implements JmeContext, Runnable {
         }
     }
 
-    private static long timeThen;
-    private static long timeLate;
+    private long timeThen;
+    private long timeLate;
 
     public void sync(int fps) {
         long timeNow;