v2.2.5
executor
एक निर्धारित अधिकतम समानांतरता और दर के साथ एसिंक कार्यों को निष्पादित करता है।
33लाइक 18.1 हज़ार30-दिन डाउनलोड160Pub अंक
AndroidiOSWebmacOSWindowsLinux
डार्ट के लिए एसिंक टास्क एक्जीक्यूटर
>=1.9.0 <2.0.0^5.0.0^1.3.0यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
Executes async tasks with a configurable maximum concurrency and rate.
A simple usage example:
final executor = Executor(concurrency: 10);
// only 10 of them will be running at a time
for (var i = 0; i < 20; i++) {
// ignore: unawaited_futures
executor.scheduleTask(() async {
// await longDatabaseTask()
// await anotherProcessing()
});
}
await executor.join(withWaiting: true);
await executor.close();