Return tasks from spawn and spawn_stream

Also, eliminate the background spawning methods. We can spawn futures
on the executor and then spawn those on the app if we need to wait for
the result of running one.
This commit is contained in:
Nathan Sobo 2021-03-18 20:10:32 -06:00
parent f849857309
commit e809d6119a
7 changed files with 317 additions and 267 deletions

21
Cargo.lock generated
View file

@ -782,6 +782,7 @@ dependencies = [
"parking_lot",
"pathfinder_color",
"pathfinder_geometry",
"pin-project",
"rand 0.8.3",
"smallvec",
"smol",
@ -1076,6 +1077,26 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "pin-project"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63"
dependencies = [
"pin-project-internal",
]
[[package]]
name = "pin-project-internal"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "pin-project-lite"
version = "0.2.4"