Problem with pthread + Embedded linux and threads limits
I'm currently working on a project with embedded linux and came across a problem creating threads. My process often launch a thread to threat an event, but after the number of events outnumber the thread limit of the system (919 max threads), the threads stop working properly, and the system become slow.
I tried increase the thread limit of the kernel (
/proc/sys/kernel/threads-max) and use setrlimit(RLIMIT_NPROC), but neither solved the problem.
One solution would be create one thread to threat all the events, and not one thread for each one, but i would like to know if there is a way to let unlimited the number of threads.
|