Wait on event and condition in `c/c++`?
See original GitHub issueFor performance reasons, it would be probably useful to have the ability to wait on condition in c/c++
. Looking at monitors/drivers that could have a performance gain if used correctly.
Something like below to wait in c
and not in python
:
while condition == x:
await event
Example python syntes can be like in #1250:
await RisingEdge(dut.clock).until_after(lambda: dut.ack.value)
I think @eric-wieser @ktbarrett have some ideas.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
What is the best way to to wait until event happen in c++?
I can think of three solutions: Sleeps, Condition Variables, and WaitSets. Using sleeps, however, seems to me like the less efficient one ...
Read more >std::condition_variable::wait - cppreference.com
std::condition_variable::wait wait causes the current thread to block until the condition variable is notified or a spurious wakeup occurs, ...
Read more >Applying C - Condition Variables - I Programmer
All of the threads waiting on the condition variable are suspended until another thread uses the signal function: pthread_cond_signal(&myConVar);.
Read more >Representing a "wait until" in an activity diagram in UML
Any activity needs a certain time until it is completed. If a customer representative is available immediately, the time for the wait activity ......
Read more >Given a mutex lock m , and a condition variable c , | Chegg.com
Question: Given a mutex lock m , and a condition variable c , the following events happen in the order of occurrence shown...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think #1689 and #2208 are enough.
I’m also starting to suspect that
ReadOnly
is wrong, and that the signal should be captured immediately at the rising edge ofclock
, to match how the verilog would capture it.