when more than 10 threads starts to lag all pc , i have a very powerfull one
but its still laging if i give more than 10 threads , different programs with different code levels but same lags when 10-15 >
There are many solutions to do this, but which solution helps to optimize the source code is important. Please clarify the purpose, explain more clearly
Create a variable called "counter". Than use "is element exist" to check if element exist and update "counter" variable whenever element is missing. Check counter variable in the loop, and fail thread if "counter" hit 3