must enqueue messages with protection;
authorClaus Gittinger <cg@exept.de>
Fri, 15 Nov 2002 12:26:03 +0100
changeset 1669 6130b670c22e
parent 1668 070264d3a087
child 1670 b59ee2b757f2
must enqueue messages with protection; (need a semaphore here instead of a global lock)
ApplicationModel.st
--- a/ApplicationModel.st	Thu Nov 14 22:25:38 2002 +0100
+++ b/ApplicationModel.st	Fri Nov 15 12:26:03 2002 +0100
@@ -1180,16 +1180,12 @@
     "/ Otherwise push it as an event, to be handled when my thread is
     "/ back in the event loop.
     "/
-    (sensor 
-      hasEvent:selector
-      for:someone
-      withArguments:argList) ifTrue:[
-        ^ self
-    ].
-    sensor
-      pushUserEvent:selector
-      for:someone
-      withArguments:argList
+    [
+        (sensor hasEvent:selector for:someone withArguments:argList
+        ) ifFalse:[
+            sensor pushUserEvent:selector for:someone withArguments:argList
+        ].
+    ] valueUninterruptably
 
     "Modified: / 5.2.2000 / 00:01:54 / cg"
     "Created: / 26.2.2000 / 18:01:31 / cg"
@@ -2681,7 +2677,7 @@
 !ApplicationModel class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.175 2002-10-17 11:24:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.176 2002-11-15 11:26:03 cg Exp $'
 ! !
 
 ApplicationModel initialize!