Skip to content

In what scenario would I get no output to the console? #283

Answered by ArthurSonzogni
mscofield0 asked this question in Q&A
Discussion options

You must be logged in to vote

At first glance, I would say the std::thread is posting events more quickly than what the screen can process. You probably send hundreds of millions of them per seconds, and the screen is processing only a few millions.

The screen's loop implementation:

void ScreenInteractive::Main(Component component) {
while (!quit_) {
if (!event_receiver_->HasPending()) {
Draw(component);
std::cout << ToString() << set_cursor_position;
Flush();
Clear();
}
Event event;
if (!event_receiver_->Receive(&event))
break;
if (event.is_cursor_reporting()) {

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mscofield0
Comment options

@ArthurSonzogni
Comment options

@mscofield0
Comment options

@mscofield0
Comment options

@mscofield0
Comment options

Answer selected by mscofield0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants