Author Topic: Focus of Control in Multithread Sequence Diagrams  (Read 481 times)

bena

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1 Gold!
    • View Profile
Focus of Control in Multithread Sequence Diagrams
« on: May 01, 2002, 08:30:31 am »
I am evaluating the trial version of EA.  Using the Sequence Diagram, I have been unable to get the focus of control to show what is really happening in a multithreaded environment.

I am trying to depict two threads that synchronize through a Windows Event object.  A simplified diagram is shown below.  The two threads and the event object at the top of the diagram.  Thread usage of the event is shown as messages.

The diagram looks something like this:

**** Begin diagram****
Thread1            EventObject            Thread2
--------            -----------             -------
(1) WFSO------------>

                              <-------------(2) SO
<---------------(3) WFSO return
                      (4) SO return---------->

                               <------------(5) WFSO

(6) SO---------------->
                       (7) WFSO return------->
<----------------(8)SO return        

**** End of diagram ****
In the diagram, all messages are synchronous.
  "WFSO" means: a WaitForSingleObject() call.
   "SO" means: a SetObject() call.

The return messages from the API calls are also synchronous and have the "Is Return" box checked.

In a real application, focus of control for Thread1 one would be between message (3) and message (8).  Focus for control for Thread2 would be between messages (1) and (5).  Thread2 also would also have control between messages (7) and (8).

The EA sequence diagram does not show this.  It shows Thread1 control on messages (1) and (3) as independent blocks.  It also shows Thread1 control between messages (6) and (8).  It shows Thread2 control as expected.

Does anyone have a suggestion of how I can get the Sequence Diagram to show the actual Thread1 behavior?  Is this the best way to depict two threads synchronizing through an event object?

Thanks for any suggestions.