I want to create a server that pulls the modem_message event and prints to the console, but I also want the computer to be able to send messages (based on io.read()) while waiting for a message. I tried using threads, but I think I am using them wrong. As far as I know there is no thread.sleep() so I'm not sure how to suspend a thread for a short period of time so that you can still type messages, but still have that thread automatically continue. How would I go about doing this?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I want to create a server that pulls the modem_message event and prints to the console, but I also want the computer to be able to send messages (based on io.read()) while waiting for a message. I tried using threads, but I think I am using them wrong. As far as I know there is no thread.sleep() so I'm not sure how to suspend a thread for a short period of time so that you can still type messages, but still have that thread automatically continue. How would I go about doing this?
Link to post
Share on other sites