tmp
This commit is contained in:
parent
03d8d03bdc
commit
d3abef6ac4
@ -41,12 +41,12 @@ public:
|
|||||||
for (size_t i = 0; i < 10; i++)
|
for (size_t i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
std::cout << "do something here...\n";
|
std::cout << "do something here...\n";
|
||||||
wait_for_kerboard();
|
|
||||||
|
|
||||||
|
wait_for_kerboard();
|
||||||
if (end_process()) break;
|
if (end_process()) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_end_process(false);
|
set_end_process();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ void gctl::process_monitor::keyboard_actions()
|
|||||||
std::cout << "\rInput 'q' to quit: ";
|
std::cout << "\rInput 'q' to quit: ";
|
||||||
std::cin >> key_str;
|
std::cin >> key_str;
|
||||||
|
|
||||||
if (key_str == "q") set_end_process();
|
if (key_str == "q") set_end_process(true);
|
||||||
cv_.notify_one();
|
cv_.notify_one();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ namespace gctl
|
|||||||
virtual void wait_for_kerboard();
|
virtual void wait_for_kerboard();
|
||||||
virtual void keyboard_actions();
|
virtual void keyboard_actions();
|
||||||
virtual bool end_process();
|
virtual bool end_process();
|
||||||
void set_end_process(bool ask = true);
|
void set_end_process(bool ask = false);
|
||||||
|
|
||||||
std::thread process_wapper()
|
std::thread process_wapper()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user