Jump to content


G1itcher's Content

There have been 2 items by G1itcher (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#180633 Missing Events

Posted by G1itcher on 25 May 2014 - 10:33 PM in Ask a Pro

View PostGamerNebulae, on 25 May 2014 - 10:10 PM, said:

View PostG1itcher, on 25 May 2014 - 10:07 PM, said:

What methods or library calls might cause events to fall off the event list?

So far I know of two:

sleep()
read()

are there any other situation or library call that could potentially cause an issue with missing events? (This is for a stationary computer)

Could you maybe clarify your question?

Sorry, I've updated my question with my usage scenario.

View PostTheOddByte, on 25 May 2014 - 10:16 PM, said:

View PostGamerNebulae, on 25 May 2014 - 10:10 PM, said:

Could you maybe clarify your question?
I think he means that it clears a queued event
os.queueEvent( "key", 28 )
sleep( 0 )
print( os.pullEvent() ) --# Will wait for a key since the even queue was cleared

But I guess basically all functions that use os.pullEvent ( sleep and read does )

Is there any information on what uses os.pullEvent? I'm stopping just short of writing my own seperate event list so I don't have to deal with this issue



#180628 Missing Events

Posted by G1itcher on 25 May 2014 - 10:07 PM in Ask a Pro

What methods or library calls might cause events to fall off the event list?

So far I know of two:

sleep()
read()

are there any other situation or library call that could potentially cause an issue with missing events? (This is for a stationary computer)

Usage scenario:

I've written a program that relies on several events happening per tick. I've found that some events seems to disappear from the queue if limited to happen every x seconds or so (via monitoring delta time, not using sleep())

In this particular case, I have an event called "walkto" and an event called "step_sound", walkto is dispatched 50 times for every step_sound. I've found that in such a scenario, I rarely get the "step_sound" events to show up, even though I can see them getting queued.