Concurrency documentation

This is a discussion on Concurrency documentation within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Hello, I have been recently working on a major project which involves threading and concurrency issues. This implementation now needs ...

  1. #1
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    359

    Concurrency documentation

    Hello,

    I have been recently working on a major project which involves threading and concurrency issues. This implementation now needs to be documented(should of been the other way round, but well, I'm a programmer). Does anyone know of a good tool which would show how the threading works with my classes? Would UML do the job?

    Thanks for any feedback.
    Be a leader and not a follower.

  2. #2
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    >Would UML do the job?

    A UML Sequence diagram can illustrate program flow, but only for particular sequence of execution (hence the name). You could use it to show thread creation and actions being executed in parallel but I think it could get messy. You might be better of just writting a document that expains your synchronization decisions in plain english. I guess it all depends on what kind of documentation you're looking for.

  3. #3
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    359
    Right ok thanks, I will have a try with the UML diagram some how :-)
    Be a leader and not a follower.

  4. #4
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    If your trying to notate whether a particular method is synchronized or guarded, then you should be able to do so using sequence or interaction diagrams. Also, for the broader picture, activity diagrams can show what steps could be done in parallel.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    470
    Perspective, I think sequence diagrams would be pretty good for this stuff. Most of the time, when you have a scenario in your system, you can say this step comes after that step, comes after that step. With parallel threads, you have a particular thread object executing the steps in parallel. Either the scenario spawns a worker thread to accomplish something, or there's some communication between two objects in two different threads. For both he should be able to documentate, either by using the tool's selection of method call semantics or by using stereotypes.

  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    okinrus: yeah, that was my first thought... and thats why i suggested a sequence diagram. But then i thought of a server situation. If he's trying to illustrate 2 parallel threads than a sequence diagram would work fine. But if there are 10 or more threads the diagram will be an incomprehensible mess.

  7. #7
    Registered User subdene's Avatar
    Join Date
    Jan 2002
    Posts
    359
    I basically have a master thread which all classes post their messages to, and the particular event that occured through WPARAM and LPARAM. The master thread then filters out these events, as I can have events within events, then these events get posted to my UI thread, and the UI is updated accordigly. Thats the basic framework of the system.

    The events are TAPI, SAPI and some others generated from my own classes. Thanks for your advice people.
    Be a leader and not a follower.

  8. #8
    Registered User axon's Avatar
    Join Date
    Feb 2003
    Posts
    2,572
    you could look into two good documentation programs: doors and rational rose

    some entropy with that sink? entropysink.com

    there are two cardinal sins from which all others spring: Impatience and Laziness. - franz kafka

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 06-04-2009, 09:18 AM
  2. C++ Documentation Project (wiki, like php.net)
    By Tempest1 in forum C++ Programming
    Replies: 3
    Last Post: 09-28-2005, 02:11 PM
  3. C# Documentation
    By Mephisto_2k in forum C# Programming
    Replies: 1
    Last Post: 05-06-2004, 05:16 PM
  4. MSDN Documentation with Visual Studios
    By dalek in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 08-20-2003, 06:01 PM
  5. Directx SDK Documentation
    By Zoalord in forum Game Programming
    Replies: 4
    Last Post: 05-08-2003, 06:07 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21