summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/isode/stroke/eventloop/SimpleEventLoop.java')
-rw-r--r--src/com/isode/stroke/eventloop/SimpleEventLoop.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/isode/stroke/eventloop/SimpleEventLoop.java b/src/com/isode/stroke/eventloop/SimpleEventLoop.java
new file mode 100644
index 0000000..003fc98
--- /dev/null
+++ b/src/com/isode/stroke/eventloop/SimpleEventLoop.java
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2010, Isode Limited, London, England.
+ * All rights reserved.
+ */
+
+package com.isode.stroke.eventloop;
+
+/**
+ * Don't use this, it simply runs the callback in the same thread.
+ * It is useful for unit testing, but will break GUIs.
+ */
+public class SimpleEventLoop extends EventLoop {
+ @Override
+ protected void post(Event event) {
+ event.callback.run();
+ }
+}