-
Notifications
You must be signed in to change notification settings - Fork 662
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
682: Daemon concurrent rpc operations r=gerboland a=townsend2010 Behavior of this branch (so far); 1. The check for ssh up in `launch`, `start`, and `restart`, should be asynchronous. 2. Issuing a `multipass delete -p <instance_name>` on a starting instance should be safe when using the qemu & libvirt backends. 3. Installing `sshfs` during `start` should be asynchronous like when defining a mount for the first time on a stopped instance. Left to do: 1. Make installing `sshfs` during the `mount` command asynchronous. 3. Making other operations asynchronous like preparing an image, downloading an image, uncompressing an image. Co-authored-by: Chris Townsend <[email protected]>
- Loading branch information
Showing
18 changed files
with
515 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2017-2018 Canonical, Ltd. | ||
* Copyright (C) 2017-2019 Canonical, Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -13,15 +13,15 @@ | |
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Authored by: Alberto Aguirre <[email protected]> | ||
* | ||
*/ | ||
|
||
#ifndef MULTIPASS_VIRTUAL_MACHINE_H | ||
#define MULTIPASS_VIRTUAL_MACHINE_H | ||
|
||
#include <chrono> | ||
#include <condition_variable> | ||
#include <memory> | ||
#include <mutex> | ||
#include <string> | ||
|
||
namespace multipass | ||
|
@@ -63,6 +63,8 @@ class VirtualMachine | |
VirtualMachine::State state; | ||
const SSHKeyProvider& key_provider; | ||
const std::string vm_name; | ||
std::condition_variable state_wait; | ||
std::mutex state_mutex; | ||
|
||
protected: | ||
VirtualMachine(VirtualMachine::State state, const SSHKeyProvider& key_provider, const std::string& vm_name) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.