Search code examples
multithreadingumlsequence-diagram

How to illustrate multiple threads in sequence diagram?


How can you clearly illustrate multiple threads of execution in a sequence diagram or similar diagram?

I haven't been able to find any clear examples. All diagrams I see are used to illustrate a single thread.


Update: The accepted answer was the best example I saw but it does leave a fair bit to be desired. I ended up illustrating the threads in separate sequence diagrams. I'm not sure if the sequence diagram necessarily works for multiple threads.


Solution

  • Here is one diagram that may be useful, and on the left-hand side you can see the explanation: http://sdedit.sourceforge.net/multithreading/example/index.html

    Multithreading Sequence Diagram