You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a general question, I probably just don't understand things enough.
The following program prints "timer" to the console every second, and when something gets written to the stdin, the program print "received stdin", sleeps 5 seconds then prints "end stdin".
The issue is, when the stdin event is triggered, the timer is stopped until the stdin callback exits.
I can solve this problem by using the ThreadPool and inside the Task, handle the stdin, but then I lose access to the xev.Completion and on-demand callback (I'd need a while(true) to read stdin)
Is there a way to run both the timer and stdin callbacks concurrently?
extra question: what are these poll events? To be honest I kinda guessed 1 and it worked as I wanted
The text was updated successfully, but these errors were encountered:
This is a general question, I probably just don't understand things enough.
The following program prints "timer" to the console every second, and when something gets written to the stdin, the program print "received stdin", sleeps 5 seconds then prints "end stdin".
The issue is, when the stdin event is triggered, the timer is stopped until the stdin callback exits.
I can solve this problem by using the ThreadPool and inside the Task, handle the stdin, but then I lose access to the xev.Completion and on-demand callback (I'd need a while(true) to read stdin)
Is there a way to run both the timer and stdin callbacks concurrently?
extra question: what are these poll events? To be honest I kinda guessed 1 and it worked as I wanted
The text was updated successfully, but these errors were encountered: