Status menu using threads in c++ winapi : I'm writing my application and I need to have a status menu that shows the current state of a verification function. The function for the verification is CPU heavy and needs to work so I cannot print my status all the time. Currently this is my code:

    HANDLE t = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)thread_test, 0, 0, 0);
	int c;
	while (true)
	{
		printf("[s]tatus, [e]xit => ");
		c = getch();
		putchar(c);
		if (c == 's') {
			putchar('\n');
			is_visible = true;
		}
		else if (c == 'e')
			ExitProcess(0);
		else putchar('\n');
	}

And this is the code for `thread_test()`:

    bool is_visible = false;
    void thread_test() {
        while (true) {
            if (is_visible == true) printf("This is status.\n");
        }
    }

Now how can I make the `thread_test()` function display this message only once and then continue without showing anything? Thanks in advance.