Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. How to implement multi-threading in C++

How to implement multi-threading in C++

Scheduled Pinned Locked Moved Managed C++/CLI
c++tutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Amarelia
    wrote on last edited by
    #1

    Hi, I need to implement the multi-threading using C++(Not VC++). What are the options available fot it. Thanks in advance. Regards Mahesh

    T 1 Reply Last reply
    0
    • A Amarelia

      Hi, I need to implement the multi-threading using C++(Not VC++). What are the options available fot it. Thanks in advance. Regards Mahesh

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      this is not a question for the Managed C++ forum definitely...


      TOXCCT >>> GEII power
      [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

      N 1 Reply Last reply
      0
      • T toxcct

        this is not a question for the Managed C++ forum definitely...


        TOXCCT >>> GEII power
        [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

        N Offline
        N Offline
        Nick_Kisialiou
        wrote on last edited by
        #3

        Actually, I wonder why there is no C++ forum here. If he posts the same question in "Visual C++" forum, people will complain that it is not Visual C++ question. If he posts it in here, people still complain that it is not a Managed C++ forum. Poor C++ programmers... As to the question, you have to use _beginthreadex and _endthreadex. These functions are in C++ standard library and they know how to free the resources of your threads. Don't use beginthread and endthread because they are obsolete. Neither should you use windows CreateThread and ExitThread because Win32 functions don't know about C++ library and may not be able to free the resources adequately. As a reference I would recommend Jeffrey Richter "Programming Applications for Microsoft Windows". He talks about multithreading, multiprocessing, memory structure (very interesting things like Address Windowing Extensions), exceptions, and other useful stuff. It may be difficult to find this book though. Amazon does not sell it any more.

        T 1 Reply Last reply
        0
        • N Nick_Kisialiou

          Actually, I wonder why there is no C++ forum here. If he posts the same question in "Visual C++" forum, people will complain that it is not Visual C++ question. If he posts it in here, people still complain that it is not a Managed C++ forum. Poor C++ programmers... As to the question, you have to use _beginthreadex and _endthreadex. These functions are in C++ standard library and they know how to free the resources of your threads. Don't use beginthread and endthread because they are obsolete. Neither should you use windows CreateThread and ExitThread because Win32 functions don't know about C++ library and may not be able to free the resources adequately. As a reference I would recommend Jeffrey Richter "Programming Applications for Microsoft Windows". He talks about multithreading, multiprocessing, memory structure (very interesting things like Address Windowing Extensions), exceptions, and other useful stuff. It may be difficult to find this book though. Amazon does not sell it any more.

          T Offline
          T Offline
          toxcct
          wrote on last edited by
          #4

          RainbowWyrm wrote:

          I wonder why there is no C++ forum here

          the question is legitimate. consider the fact though that you are on CodeProject on a web site dedicated to the Microsoft development technologies... (Visual Studio, etc...)


          TOXCCT >>> GEII power
          [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

          S 1 Reply Last reply
          0
          • T toxcct

            RainbowWyrm wrote:

            I wonder why there is no C++ forum here

            the question is legitimate. consider the fact though that you are on CodeProject on a web site dedicated to the Microsoft development technologies... (Visual Studio, etc...)


            TOXCCT >>> GEII power
            [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

            S Offline
            S Offline
            Sebastian Schneider
            wrote on last edited by
            #5

            Yeah, but sometimes, you got to stay platform-independant while still working in Visual Products (though that kinda limits you to C++). For starters: I got MS VC++ 2005 Express. I use it to develop a OpenSource-Qt freeware tool. If I have Qt-questions, I AM gonna ask them in a Qt-Forum, but if I am stuck with VS-Problems or Standard-C++ issues, I'd rather ask on CodeProject.

            T 1 Reply Last reply
            0
            • S Sebastian Schneider

              Yeah, but sometimes, you got to stay platform-independant while still working in Visual Products (though that kinda limits you to C++). For starters: I got MS VC++ 2005 Express. I use it to develop a OpenSource-Qt freeware tool. If I have Qt-questions, I AM gonna ask them in a Qt-Forum, but if I am stuck with VS-Problems or Standard-C++ issues, I'd rather ask on CodeProject.

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #6

              Sebastian Schneider wrote:

              if I am stuck with VS-Problems or Standard-C++ issues, I'd rather ask on CodeProject

              yeah... that's what the Visual C++ forum is for... C++/CLI forum is for managed C++ (you know, thet stufs for the .NET framework....)


              TOXCCT >>> GEII power
              [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups