Reputation: 4251
What would be the best UML diagram to show decoupling of two multithreaded classes, joined by a producer consumer queue.
I've done a whole bundle of class diagrams in the past, but they seem to be really static. Is it possibly the case that UML is not very good at modelling threading.
Thanks.
Upvotes: 0
Views: 1101
Reputation: 2754
Standard UML doesn't support well concurrency. So UML has defined "profiles" for specialized needs. See Real time UML: advances in the UML for real-time systems http://books.google.com/books?id=LewzKVv3A20C&printsec=frontcover&dq=UML+REAL+TIME&source=bl&ots=VcKe_Lj8_P&sig=fpZ8hmokNe-rNUR4WlqTM1_1Fds&hl=en&ei=XIY5TLqrBpiTONnL7IoK&sa=X&oi=book_result&ct=result&resnum=6&ved=0CDIQ6AEwBTgK#v=onepage&q&f=false
Upvotes: 1
Reputation: 3418
Use a sequence diagram. One lifeline for each class, one lifeline for the queue.
Upvotes: 0