thread creation fails after a number of iteration
Hi,
I am running one service which creates three levels of threads . (ie main thread creates a thread , new one creates another like that ) and I am waiting for all threads by pthread_join call. The logic looks like below. But after a number(around 1500) of iteration pthread_create fails with error EAGAIN. Anybody having any idea? main() while (1) { create(thread1) sleepforsometime() } thread1() { for i times { create (thread2) } wait for i threads //(thread2) } thread2() { do some works return } |
Quote:
So, roughly: 3375000000 thread are created, and then your program fails reporting "EAGAIN" (which means according to the man page "not enough system resources"). Quote:
|
All times are GMT -5. The time now is 12:30 PM. |