New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waiting for a already handled event blocks forever #226

Open
spaceone opened this Issue Feb 15, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@spaceone
Contributor

spaceone commented Feb 15, 2017

When waiting for a already handled event the coroutine is never entered back again and blocks forever (or until a event is thrown with the same name?).

Probably the following can demonstrate the issue:

event = MyEvent()
self.fire(event)
yield
yield self.wait(event)

CC @ke4roh

spaceone added a commit that referenced this issue Feb 15, 2017

Write a test for issue #226
* waiting for an already finished event should work
@kromg

This comment has been minimized.

Show comment
Hide comment
@kromg

kromg Jun 19, 2018

Collaborator

Hi,
to address this issue, shouldn't waitEvent()check if the event is done already and yieldimmediately if so? Event class has a complete attribute which could be used for that, or an explicit fired attribute could be used and set by the fire() method to mark the event as fired.

Collaborator

kromg commented Jun 19, 2018

Hi,
to address this issue, shouldn't waitEvent()check if the event is done already and yieldimmediately if so? Event class has a complete attribute which could be used for that, or an explicit fired attribute could be used and set by the fire() method to mark the event as fired.

@prologic

This comment has been minimized.

Show comment
Hide comment
@prologic

prologic Jun 19, 2018

Member

PRs are welcome :)

Member

prologic commented Jun 19, 2018

PRs are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment