Vixen
02b45cc4
csharp
public sealed class WorkerHost

What a worker process does: answer import requests until the pipe closes.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The whole worker is this loop and one executor. It holds no cache, writes no sidecars and knows nothing about build plans — all of that stays in the coordinator, so there is one copy of it and a worker cannot disagree with the process that started it.

Its registry comes from BuiltInImporters, not from an argument. A worker with a different importer set produces different artefacts for the same file, and the disagreement surfaces as a cache that never hits — or as a build whose output depends on how many cores the machine has.

Fields and properties (1)

  • public static int DefaultWorkerCount

    How many workers to run when nobody said.

Methods (5)

  • public WorkerHost(string projectRoot)

    Serves imports out of a project directory.

  • public WorkerHost(IImportExecutor executor)

    Serves imports through a given executor, which is what a test hands it.

  • public Task ServeAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))

    Answers requests until the other end goes away.

  • public Task<ImportResponseMessage> RunAsync(ImportRequestMessage request, CancellationToken cancellationToken = default(CancellationToken))

    Runs one request.

  • public static bool TryParse(IReadOnlyList<string> arguments, out string pipe, out string root)

    Parses the arguments a worker is started with.

Used by (1)

  • CompilerPoolVixen.AssetCompiler