Closed sukhcha-in closed 2 years ago
Solved, just by adding Future to threadExecutor and then adding await for each executor in loop.
Future threadExecutor
for (final chunk in chunks) {
await threadExecutor(chunk);
}
You can pass the parameter 'sequential' to the AsyncExecutor.
It's exactly for that.
https://pub.dev/documentation/async_task/latest/async_task/AsyncExecutor/AsyncExecutor.html
Best regards
I have list of chunks which and I want to process each chunk
one by one
. I want to execute chunk[0, 0, 0, 0]
first, then[1, 1, 1, 1]
then[2, 2, 2, 2]
. But all the tasks in chunk should run parallely at same time. Any way of doing this?Output: