Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

WIP: See if CI passes with fixes to futures 0.3 migration#34

Closed
Xanewok wants to merge 8 commits intobernhard-futures-migrationfrom
igor-futures-pass-ci
Closed

WIP: See if CI passes with fixes to futures 0.3 migration#34
Xanewok wants to merge 8 commits intobernhard-futures-migrationfrom
igor-futures-pass-ci

Conversation

@Xanewok
Copy link
Copy Markdown
Contributor

@Xanewok Xanewok commented Mar 25, 2021

Builds on #33.

Let's see if CI gods are merciful

Xanewok added 7 commits March 25, 2021 03:17
Since Tokio 0.2, spawning the `tokio::process::Command` must be done in
the Tokio context, so make sure to spawn the compilation root task in
the Tokio runtime that's now available in the `SccacheService`.

This fixes a hang in the `sccache_cargo` integration test.
It seems entirely synchronous, as it doesn't hit any await points and
additionally seems to be trigger-happy with mutex locks in inner calls,
so better be safe and prevent the future reader from thinking that this
function is async-safe.
The reason for that being not to mix the Tokio runtime and the `futures`
executor. While it's reasonable and possible to do so, I believe there's
bigger benefit for now to stick to a single executor.
It would be great if we could keep the code using 'vanilla' `futures`
crate but Tokio support is so baked in (e.g. child process harness) that
it seems that it'd require a lot more change for questionable benefit in
this case.
Doing so may yield another benefit - currently, there seems to be a lot
of disk I/O being done on a dedicated, blocking thread pool. It's possible,
now that we use a single executor, to use Tokio facilities for async I/O
if this proves to be faster when supported properly by the native
environment at some point (e.g. with `io_uring` on Linux).
@Xanewok Xanewok marked this pull request as ready for review March 25, 2021 20:04
@drahnr
Copy link
Copy Markdown
Contributor

drahnr commented Mar 26, 2021

🎉

@drahnr
Copy link
Copy Markdown
Contributor

drahnr commented Mar 26, 2021

@Xanewok I'd be happy to merge this and then move onto refactoring the commits into viable chunks

@Xanewok
Copy link
Copy Markdown
Contributor Author

Xanewok commented Mar 27, 2021

Superseded by #33.

@Xanewok Xanewok closed this Mar 27, 2021
@Xanewok Xanewok deleted the igor-futures-pass-ci branch March 27, 2021 18:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants