Search code examples
multithreadingasynchronousconcurrencyumlactivity-diagram

Modelling inter thread communication in activity diagram


I am trying to model an application which runs multiple concurrent flows. In this situation multiple threads can create events and store them in a buffer which are then collected and displayed by another thread. The receiving thread is supposed to block and wait for incoming events.

I have currently modelled it like this: enter image description here This example uses object flows. However I am not sure if this is the correct way to model this type of inter thread communication.

The other option I was looking at is using signals but I'm not sure about that either. Any help would be appreciated.


Solution

  • Every activity requires all tokens to be offered before it can start. You will have to use a buffer node as a queue.