dust/examples/async.ds
2023-11-30 09:48:56 -05:00

20 lines
335 B
Plaintext

create_random_numbers <fn int> |count| {
mnumbers = [];
while (length numbers) < count {
numbers += (random_integer)
}
(output "Made " + count + " numbers.")
}
(output "This will print first.")
async {
(create_random_numbers 1000)
(create_random_numbers 100)
(create_random_numbers 10)
}
(output "This will print last.")