Skip to content
Discussion options

You must be logged in to vote

This is expected behaviour, and is because the typing at the Lua prompt causes events to be consumed from the queue. What's actually happening here is:

  • os.queueEvent("foo", "bar") queues the foo event.
  • The lua program calls read, which consumes your foo event and discards it.
  • You type os.pullEvent("foo"). This a dozen key and char events, which read also consumes.
  • os.pullEvent("foo") is run. The queue is now empty, so this waits forever.

Replies: 1 comment 5 replies

Comment options

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

@ghost
Comment options

@SquidDev
Comment options

@ghost
Comment options

@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant