Multithreading

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • developing
    New Member
    • Mar 2007
    • 110

    Multithreading

    What do you preferred for multithreading? .NET or C++?

    i am doing a report on the caveats/advantages; any platforms for comparison? ideas? comments?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I honestly think threads are easier to understand in c++ then in .NET
    Closing threads threads seems to be easier in c++ too. I guess I dislike how often I do my threads wrong in .NET and they stay open after my program closes

    Comment

    • developing
      New Member
      • Mar 2007
      • 110

      #3
      interesting. invaluable personal opinion/experience...th anks

      any specific links on the internet regarding c++?

      Comment

      • Knuckless
        New Member
        • Sep 2009
        • 2

        #4
        My topics are always close when i close application(For mClosing event and Thread.Abort) if that dont help GetCurrentProce ss.Exit(). Threads in .NET are easy

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          Easy to setup yes, but if they're doing IO and are "busy" they won't always exit.
          I started insterting things into the Disposing() function of the form to deal with it better.

          Comment

          • developing
            New Member
            • Mar 2007
            • 110

            #6
            Originally posted by Plater
            Easy to setup yes, but if they're doing IO and are "busy" they won't always exit.
            I started insterting things into the Disposing() function of the form to deal with it better.
            for specifically that, you can use threadName.Join ()

            it will stop the calling the thread till threadName finishes execution...obv iously standard warnings about threads apply

            Comment

            • Plater
              Recognized Expert Expert
              • Apr 2007
              • 7872

              #7
              Hmm I am starting to like the form.closing sugestion.
              There have been times when the delegate callback for the thread (so that it can update the gui) throws exceptions because it has fired the callback after the form has disposed of its controls.
              Interesting.

              Comment

              Working...