Is there an inituitive UML approach to depict threads

后端 未结 8 1365
独厮守ぢ
独厮守ぢ 2020-12-23 02:09

I\'m fond of using UML diagrams to describe my software. In the majority of cases the diagrams are for my own use and I use them for more involved pieces of code, interactio

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-23 02:45

    Traditionally threading has been depicted diagramatically using Petri Nets. Rob Martin has an article on multithreading in UML which you may find useful.

    Update- just remembered you can represent threads with forks in activity diagrams- I've managed to find something that explains this.

    It is very hard to find any free tutorials for Petri Nets, however I know Petri Nets are good for modeling concurrency, so I Google'd "producer-consumer Petri Nets" (my favourite threading thing) and found this.

    I've also found some slides that show Petri Nets modeling a Semaphore.

提交回复
热议问题