W
www
Hi,
I have a while-loop which loops 360 times. Each looping takes 100ms, so
in total it takes 36 seconds, which is very long.
while(true) //looping 360 times
{
....//code for preparation of the method calling in the end
doIt(); //this method takes time. It inserts data into database
}
Right now, the flow is:
first looping -> second looping -> ..... -> 360th looping
I am wondering if I can make the loopings more or less concurrent so no
need for next looping to wait for the previous looping ends:
first looping ->
second looping ->
....
360th looping ->
Could you please give me some help? Thank you.
I have a while-loop which loops 360 times. Each looping takes 100ms, so
in total it takes 36 seconds, which is very long.
while(true) //looping 360 times
{
....//code for preparation of the method calling in the end
doIt(); //this method takes time. It inserts data into database
}
Right now, the flow is:
first looping -> second looping -> ..... -> 360th looping
I am wondering if I can make the loopings more or less concurrent so no
need for next looping to wait for the previous looping ends:
first looping ->
second looping ->
....
360th looping ->
Could you please give me some help? Thank you.