Home » Community » Newbie corner » Stopping ReadStdIn() function
Stopping ReadStdIn() function [message #57030] |
Sun, 16 May 2021 20:08 |
|
Xemuth
Messages: 387 Registered: August 2018 Location: France
|
Senior Member |
|
|
Hello,
I'm working on a project which implement a tiny command line interface :
Upp::String command;
LOG("Command line interface ready");
while(command != "exit" && !secureStop){
command = ToLower(ReadStdIn());
Cout() << ProcessCommandLine(command);
}
secureStop boolean is use to stop my app (in case of SIGINT) however, since my while is in blocking mode because of ReadStdIn() It wont stop my app until I write something to console.
Is there a way to set a timeout or stop the ReadStdIn() ?
[Updated on: Sun, 16 May 2021 20:08] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 28 21:57:23 CEST 2024
Total time taken to generate the page: 0.03071 seconds
|