Skip to content
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

Remove the Trigger base class from Event and Lock #989

Merged
merged 1 commit into from Jul 2, 2019

Conversation

eric-wieser
Copy link
Member

These objects are not triggers - they cannot be yielded as their prime method takes too many arguments.

Instead, they have methods which return triggers - Event is used as yield event.wait(), and Lock is used as yield lock.acquire().

Copy link
Member

@imphil imphil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a small nit

cocotb/triggers.py Outdated Show resolved Hide resolved
These objects are not triggers - they cannot be yielded as their `prime` method takes too many arguments.

Instead, they have methods which return triggers - `Event` is used as `yield event.wait()`, and `Lock` is used as `yield lock.acquire()`.
@eric-wieser
Copy link
Member Author

FIXME removed

@imphil imphil merged commit 524e45f into cocotb:master Jul 2, 2019
@imphil imphil added this to the 1.2 milestone Jul 2, 2019
@eric-wieser eric-wieser deleted the Event-is-not-a-trigger branch July 3, 2019 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants