Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Maximum Threads
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dan Shappir  
View profile  
 More options Nov 4 1996, 3:00 am
Newsgroups: comp.os.ms-windows.programmer.win32
From: "Dan Shappir" <shap...@math.tau.ac.il>
Date: 1996/11/04
Subject: Re: Maximum Threads

Mark Wickman <wst...@light.iinet.net.au> wrote in article
<32843e2f.13408...@news.m.iinet.net.au>...

> Does anyone know of a rule of thumb etc. for what is considered too
> many threads to execute at once ?

> I know it is based on many different factors, but in theory my
> application could create 1000's of threads so I need a user
> configurable limit to impliment in the settings and need some
> guidelines on actual numbers. I have searched through the help files
> in VC++ plus on MSDN plus on the Internet without much luck.

> Does anyone have any ideas ?

I'm also unaware of any documented restrictions on the number of
threads, but if your application can spawn 1000's you should rethink
your design. There are several reasons for this:
1. Threads require and acquire system resources (even worker threads).
   Even if you don't reach the limit you are going to adversely effect
   system performance.
2. Context switches are expensive, especially on Windows 95.
   Many threads often mean many context switches.
   Even if not I suspect that many threads will result in longer context
switches.
3. The different Win32 platforms probably have different restrictions
   on the number of threads.
4. You may cause other threaded applications to fail.
If you are only targeting the new NT you may want to look into fibers but
I think the best solution is to maintain state in C++ objects instead of on
a thread's stack.

Dan
==============================================================
  Dan Shappir
  http://www.math.tau.ac.il/~shappir
  36 Rembrandt St. Tel-Aviv Israel 64045 Tel. (972)3-5246879


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.