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. max number of threads/Win32 process

max number of threads/Win32 process

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • S Offline
    S Offline
    Shiva Prasad
    wrote on last edited by
    #1

    hi, Is there any limitation on maximum number of threads a win32 process can spawn..?? Thanks,

    M C 2 Replies Last reply
    0
    • S Shiva Prasad

      hi, Is there any limitation on maximum number of threads a win32 process can spawn..?? Thanks,

      M Offline
      M Offline
      Magnus Westin
      wrote on last edited by
      #2

      nope... no hard limit. But you are going to run out of memory. Default each thread has a 1MB stack... so go from there. Also performance vise is that too many threads running (and doing stuff) you will start to loose so much time in the thread switches that the system will grind to halt. Magnus

      1 Reply Last reply
      0
      • S Shiva Prasad

        hi, Is there any limitation on maximum number of threads a win32 process can spawn..?? Thanks,

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        I don't think (so I'm not sure) there is a limitation to the number of thread an application can spawn. However, each thread need some resources to be maintained and there is a time sharing process which becomes inefficient if you have too many threads. In brief, having a huge amount a thread will decrease a lot the performances of your app. In general, having so many thread results from a bad design.

        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