This change makes `get_cached_or_compile` return a `Future` for the
cache write instead of blocking on it. The server then waits for the
result on a thread. It also changes the server to record cache write
timings, and display the average in the stats.
Unlike sccache1, you need to specify both bucket and region, like:
SCCACHE_BUCKET=sccache
SCCACHE_REGION=us-east-1
Pretty limited testing, no automated tests currently.
This change lets the server run compile commands for supported compilers.
It doesn't do any output caching yet, but if it detects that a commandline
is a supported compiler it will send a `CompileStarted` message to the client,
run the compiler on a background thread, and then send a `CompileFinished`
message with the exit status and stdout/stderr when it completes.
This change adds a large amount of support code to allow the server
to run compiler detection on a background thread.
It adds general support for running tasks in the server (`run_task`)
and handling their results, as well as support for using `MockCommandCreator`
across threads in a safe way. This also required making `SccacheServer`
generic over `CommandCreatorSync` so that its process execution could
be mocked for tests.
The server still does not yet actually run compile commands.