sleep is not working to avoid starvation among threads of same priority

2008-10-07 Thread Rajeshwar Patil
Hi, I have two threads of same priority lets say thread A and thread B, thread A is starving since thread B has got a for loop of size 100k. So, to avoid starvation I am processing 1000 iterations of for loop(that of thread B) in one batch and giving sleep of 1ms, but still thread A is starving

sleep is not working to avoid starvation among threads of same priority

2008-10-07 Thread Rajeshwar Patil
Hi, I have two threads of same priority lets say thread A and thread B, thread A is starving since thread B has got a for loop of size 100k. So, to avoid starvation I am processing 1000 iterations of for loop(that of thread B) in one batch and giving sleep of 1ms, but still thread A is starving