// Path: src/main/java/com/kasirgalabs/etumulator/util/GUISafeDispatcher.java
// public class GUISafeDispatcher extends BaseDispatcher {
//     @Override
//     public void notifyObservers(Class<?> clazz, Object arg) {
//         final CountDownLatch latch = new CountDownLatch(1);
//         Platform.runLater(() -> {
//             super.notifyObservers(clazz, arg);
//             latch.countDown();
//         });
//         try {
//             if(!Platform.isFxApplicationThread()) {
//                 latch.await();
//             }
//         } catch(InterruptedException ex) {
//             throw new CancellationException();
//         }
//     }
// 
//     @Override
//     public void notifyObservers(Class<?> clazz) {
//         notifyObservers(clazz, null);
//     }
// }


import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.kasirgalabs.etumulator.util.GUISafeDispatcher;
package com.kasirgalabs.etumulator.processor;


@Singleton
public class GUISafeProcessorUnits extends BaseProcessorUnits {
    public GUISafeProcessorUnits() {
// Path: src/main/java/com/kasirgalabs/etumulator/util/GUISafeDispatcher.java
// public class GUISafeDispatcher extends BaseDispatcher {
//     @Override
//     public void notifyObservers(Class<?> clazz, Object arg) {
//         final CountDownLatch latch = new CountDownLatch(1);
//         Platform.runLater(() -> {
//             super.notifyObservers(clazz, arg);
//             latch.countDown();
//         });
//         try {
//             if(!Platform.isFxApplicationThread()) {
//                 latch.await();
//             }
//         } catch(InterruptedException ex) {
//             throw new CancellationException();
//         }
//     }
// 
//     @Override
//     public void notifyObservers(Class<?> clazz) {
//         notifyObservers(clazz, null);
//     }
// }


// Path: src/main/java/com/kasirgalabs/etumulator/processor/GUISafeProcessorUnits.java
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.kasirgalabs.etumulator.util.GUISafeDispatcher;

package com.kasirgalabs.etumulator.processor;


@Singleton
public class GUISafeProcessorUnits extends BaseProcessorUnits {
    public GUISafeProcessorUnits() {
        super(new RegisterFile(new GUISafeDispatcher()),