Last updated:
0 purchases
handler
Handler: Can able to handle multiple async calls once at a time
Features #
Reduce memory while multiple api calls
Getting started #
import 'package:handler/handler.dart';
copied to clipboard
Usage #
import 'dart:math';
import 'package:handler/handler.dart';
void main() async {
final handler = Handler();
// Use the rate limiter with any function
for (var i = 0; i < 5; i++) {
final result = await handler.execute((() async {
// Simulate a time-consuming operation
await Future.delayed(Duration(seconds: 2));
return Random().nextInt(9999);
}));
print(result);
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.