red-balloon-89377
10/02/2019, 3:37 PMCommandRunner::run
take a &mut self
instead of an &self
? The reason I ask is:
- In the context of https://github.com/pantsbuild/pants/issues/8311, we want to keep a mutable map of live nailgun processes somewhere Core
-scoped.
- We will probably need to either heavily alter local::CommandRunner
to add nailgun, or create a new NailgunCommandRunner
that wraps it. Currently, neither local nor a custom command runner could hold the map of nailguns, because run
takes an immutable reference.
The solutions I can think of right now:
- The map can go in Core
, and we pass it to the respective CommandRunners, changing the signature of CommandRunner.run
to be run(&self, epr: MEPR, WorkunitStore, &mut NailgunPool)
.
- The map can go into a CommandRunner
, and we could handle connection separate to run
, but then we are special-casing nailgun in the graph.
- The map can go into a CommandRunner
, and we could handle the connections at run
time, and then we’d need to modify the signature of run
aloof-angle-91616
10/02/2019, 3:39 PMArc<Mutex<_>>
or something?red-balloon-89377
10/02/2019, 3:39 PMred-balloon-89377
10/02/2019, 3:39 PMaloof-angle-91616
10/02/2019, 3:39 PMred-balloon-89377
10/02/2019, 3:39 PMred-balloon-89377
10/02/2019, 3:40 PMred-balloon-89377
10/02/2019, 3:40 PMaloof-angle-91616
10/02/2019, 3:40 PMred-balloon-89377
10/02/2019, 3:41 PMaloof-angle-91616
10/02/2019, 3:41 PMwitty-crayon-22786
10/03/2019, 6:08 AMaloof-angle-91616
10/03/2019, 4:17 PMaloof-angle-91616
10/03/2019, 4:17 PM