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. C / C++ / MFC
  4. Thread Pool in VC++.

Thread Pool in VC++.

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorial
10 Posts 3 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.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    Hi all, i have no idea about thread pool or multi threading,i need to implement in my application. please help me for this. provide me info or any example to implement it. thanks in advance.

    _ N 2 Replies Last reply
    0
    • L Le rner

      Hi all, i have no idea about thread pool or multi threading,i need to implement in my application. please help me for this. provide me info or any example to implement it. thanks in advance.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      What exactly are you trying to do? Threads are created in Windows using the CreateThread[^] API.

      «_Superman_»
      I love work. It gives me something to do between weekends.

      Microsoft MVP (Visual C++)

      Polymorphism in C

      L 1 Reply Last reply
      0
      • _ _Superman_

        What exactly are you trying to do? Threads are created in Windows using the CreateThread[^] API.

        «_Superman_»
        I love work. It gives me something to do between weekends.

        Microsoft MVP (Visual C++)

        Polymorphism in C

        L Offline
        L Offline
        Le rner
        wrote on last edited by
        #3

        Hi , i have an list control and there is so much items. list control have list of site links here i want to chk status of all links. but all links have diffrent interval time to chk the link status so thats why not able to chk with single thread or function. please tell me how can i do this for each and every link individually. each link checked after given interval and return status after checking. thanks in advance.

        _ 1 Reply Last reply
        0
        • L Le rner

          Hi , i have an list control and there is so much items. list control have list of site links here i want to chk status of all links. but all links have diffrent interval time to chk the link status so thats why not able to chk with single thread or function. please tell me how can i do this for each and every link individually. each link checked after given interval and return status after checking. thanks in advance.

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          For starters, I would recommend creating one thread each for every list control item. The link could be passed as a parameter to the thread. Later I would recommend creating a set of threads and engaging only those threads.

          «_Superman_»
          I love work. It gives me something to do between weekends.

          Microsoft MVP (Visual C++)

          Polymorphism in C

          L 1 Reply Last reply
          0
          • _ _Superman_

            For starters, I would recommend creating one thread each for every list control item. The link could be passed as a parameter to the thread. Later I would recommend creating a set of threads and engaging only those threads.

            «_Superman_»
            I love work. It gives me something to do between weekends.

            Microsoft MVP (Visual C++)

            Polymorphism in C

            L Offline
            L Offline
            Le rner
            wrote on last edited by
            #5

            is working even if the number of items in list is too large ? its safe to use it.

            _ 1 Reply Last reply
            0
            • L Le rner

              is working even if the number of items in list is too large ? its safe to use it.

              _ Offline
              _ Offline
              _Superman_
              wrote on last edited by
              #6

              It will work for large number of items, but it will not be a good design and will have performance problems. But since you're a beginner in multi-threading, I would recommend you do this first and then optimize it.

              «_Superman_»
              I love work. It gives me something to do between weekends.

              Microsoft MVP (Visual C++)

              Polymorphism in C

              L 1 Reply Last reply
              0
              • _ _Superman_

                It will work for large number of items, but it will not be a good design and will have performance problems. But since you're a beginner in multi-threading, I would recommend you do this first and then optimize it.

                «_Superman_»
                I love work. It gives me something to do between weekends.

                Microsoft MVP (Visual C++)

                Polymorphism in C

                L Offline
                L Offline
                Le rner
                wrote on last edited by
                #7

                ok i'll try this but if its not good for performance,so please tell me the any other optimize and efficient menthod,i also try and start with right way and option.

                _ 1 Reply Last reply
                0
                • L Le rner

                  ok i'll try this but if its not good for performance,so please tell me the any other optimize and efficient menthod,i also try and start with right way and option.

                  _ Offline
                  _ Offline
                  _Superman_
                  wrote on last edited by
                  #8

                  You could start by looking at the CreateThreadpool API which is available from Vista onwards.

                  «_Superman_»
                  I love work. It gives me something to do between weekends.

                  Microsoft MVP (Visual C++)

                  Polymorphism in C

                  L 1 Reply Last reply
                  0
                  • _ _Superman_

                    You could start by looking at the CreateThreadpool API which is available from Vista onwards.

                    «_Superman_»
                    I love work. It gives me something to do between weekends.

                    Microsoft MVP (Visual C++)

                    Polymorphism in C

                    L Offline
                    L Offline
                    Le rner
                    wrote on last edited by
                    #9

                    can u please provide me any example or sample application for this.

                    1 Reply Last reply
                    0
                    • L Le rner

                      Hi all, i have no idea about thread pool or multi threading,i need to implement in my application. please help me for this. provide me info or any example to implement it. thanks in advance.

                      N Offline
                      N Offline
                      Nisamudheen
                      wrote on last edited by
                      #10

                      Microsoft introduced new thread pool APIs. http://msdn.microsoft.com/en-us/library/ms686766%28VS.85%29.aspx[^] Using this you can get a function executed in a thread, without using CreateThread(). There are some good benefits in using the thread pool APIs. Please refer the link.

                      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