JdBP> "Presentation Manager is multithreaded, always has
JdBP> been, and has always
JdBP> had multiple input queues, one per application thread.
Yeah! But it has a *single* System Message Queue. This one is that accepts
events from keyboard and mouse. The multiple application message queues are
the other side.
If you PM application is in thread 1 working on a message received from PM no
other system message can and will be processed until this application thread
returns to PM. Therfore the single system message queue is blocked. No event
can go to any other application or thread from there.
Since WARP4 (WARP 3 Fixpack 10) there will be a timer that wakes up the PM if
- and only if you hit Strg+Esc. Then this timer will check the system message
queue for forthgoing messages. Fi in an given time no message is released the
blocking thread is (temporary) removed from the receiver list and the message
flow goes on.
JdBP> It's the fact that raw input is taken synchronously from the
JdBP> mouse and keyboard into
the single system message queue.
A little bit technique:
At systemstart the PM (first instance of PMSHELL.EXE) ist starting up.
This one will syncronise the keyboard and mouse events into single message
queue.
Then a PM application is started. This application has the flow:
Init PM -> create private message queue -> call PM. The PM will set this
application sleeping until it receives an event for it.
If the PM receives an event foran PM application it will search in its list to
find which application ownes the focus. Then this event is put (from system
message queue) into the applications message queue. After that the PM calls
itself the application to handle that message. Now the application controls
the PM until it returns. After return the PM showns into the system message
queue for the next message it received from keyboard/mouse to call the same or
another application with that message.
+---------------------------------+
| A
v |
>---->system message queue---+application 1 ------------->+
+application 2-------------->+
+application n-------------->+
Until the application returns from that message the PM can't send another from
system message queue.
If an application sends itsel a message to itself or another application it is
done like a fuction call. Therfore the PM can't return until this message is
finally handled.
If an application posts a message to itself or another application the message
is stored into the message queue of the receiving application and the work is
forthcoming on the current message. If the receiver of the posted message is
another application or thread that one can be waked up an run concurrently.
--- Sqed/32 1.15/development 163:
* Origin: Alles Gute kommt nach oben. (2:2476/493)
|