Charles A. Monteiro wrote:
> hi, I have been asked to ask what the impact would be of making every
> single window in the system under a new WindowManager instance. In other
> words that there would be a 1:1 relationship between a WindowManager and
> an app's window.
>
> Of course, what is meant is in regards to our apps's windows and not
> system windows.
Assuming all windowmanagers run at the same priority you have a
permissive multitasking scheme: your code will yield whenever it blocks
(on a semaphore, ie when reading a file or waiting for a window event)).
If those windows manipulate a single domain model you will have to take
multi threading issues into account (what will happen when one window
blocks on loading a file so another window can get CPU? User actions
will be processed 'during' the file read of the other window. If both
reading the file as well as the user actions in the other window alter
the same underlying domain model you have sequencing issues that you'll
need to resolve.
Be aware that you also introduce brittleness this way: say for instance
that in the future you add a persistence layer to your domain then this
would introduce new points in the code where your thread may block thus
potentially breaking the contract with your MT GUI...
HTH,
R
-