Skip to content

Instantly share code, notes, and snippets.

View denya's full-sized avatar

Denis Moskalets denya

View GitHub Profile
### Keybase proof
I hereby claim:
* I am denya on github.
* I am denya (https://keybase.io/denya) on keybase.
* I have a public key whose fingerprint is 2295 AF4A E4DC 0335 3425 30A7 573C 1EA6 5352 E189
To claim this, I am signing this object:
Future<void> sendEventsAsync() async {
// expected output: sync 1, sync 2, sync 3
// because all tasks will run in the same moment
sendFBEvent("async", 3);
sendFBEvent("async", 2);
sendFBEvent("async", 1);
}
void sendEvents() {
// expected output: sync 3, sync 2, sync 1
Future<void> sendEventsAsync() async {
// the only way to get 1.2.3 :))) is await it directly!
await sendFBEvent("async", 3);
await sendFBEvent("async", 2);
await sendFBEvent("async", 1);
}
void sendEvents() {
// expected output: sync 3, sync 2, sync 1
// because it's gonna be in sync mode,