c++ - What is the maximum number of thread that can be created ? Does system configuration need to be considered when multiThreading -


what maximum thread can create algorithm ? system configuration need considered when use multithreading ?

my hardware : intel(r) core (tm)2 duo cpu e8400 @3.00 ghz 2.00 ghz

installed ram : 4.00 gb

how many maximum threads can create / or use in project ?

windows has no "hardcoded" limit on threads count (i see marked question visual c++ tag, windows, correct?). have consider hardware limits only; first of all, default thread stack size 1 megabyte, when create thread @ least need 1 megabyte of memory stack, additionally custom code allocate memory. contexts switching not easy job os. there no sense create more threads processors cores count unless threads have wait long operation http request. so, ideally have double think before thread creation, if sure need threads, don't care limits except memory , cpu time.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -