The UI is _finally_ responsive while the builder runs.
This commit is contained in:
parent
5ae24d9b0a
commit
7c9bea81b2
4 changed files with 35 additions and 35 deletions
|
@ -20,7 +20,7 @@ struct MatchResult {
|
|||
};
|
||||
|
||||
enum BuildState {
|
||||
START, WAITING, BUILDING, DONE, STARTING, READING,
|
||||
START, WAITING, BUILDING, DONE, FORKING, READING,
|
||||
EXIT, ERROR
|
||||
};
|
||||
|
||||
|
@ -41,6 +41,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> {
|
|||
bool build_done = false;
|
||||
string line = "";
|
||||
std::future<FILE *> build_fut;
|
||||
std::future<string> read_fut;
|
||||
git_repository* repo = nullptr;
|
||||
|
||||
public:
|
||||
|
@ -60,7 +61,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> {
|
|||
FSM_STATE(START, start, ev);
|
||||
FSM_STATE(WAITING, waiting, ev);
|
||||
FSM_STATE(DONE, done, ev);
|
||||
FSM_STATE(STARTING, starting, ev);
|
||||
FSM_STATE(FORKING, forking, ev);
|
||||
FSM_STATE(READING, reading, ev);
|
||||
FSM_STATE(EXIT, exit, ev);
|
||||
FSM_STATE(ERROR, exit, ev);
|
||||
|
@ -74,7 +75,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> {
|
|||
void start(BuildEvent ev);
|
||||
void waiting(BuildEvent ev);
|
||||
void done(BuildEvent ev);
|
||||
void starting(BuildEvent ev);
|
||||
void forking(BuildEvent ev);
|
||||
void reading(BuildEvent ev);
|
||||
void error(BuildEvent ev);
|
||||
void exit(BuildEvent ev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue