vwait forever runs the events loop until the exit command.
I have some stuff to do during each iteration of the event loop. How can I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t. What you do is schedule regular timer events that do your work. For user interaction, 10 times a second is quite regular enough. To schedule regular timer events, use the
everycommand from the Tcler’s Wiki, like this:That’s the simplest form of
every; more complex cancelable versions are further down that wiki page.