-
Notifications
You must be signed in to change notification settings - Fork 15
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
IOSim Timeouts API refactor and optimisation #9
Conversation
NOTE that IntersectMBO/ouroboros-network#3682 had 1 more commit that fixed a |
Can we turn this PR into a draft, we need to do the |
3820: Fixed KeepAlive Convergence test r=bolt12 a=bolt12 # Description This small PR just extracts a particular commit from #3682 since now the actual PR lives in input-output-hk/io-sim#9. Co-authored-by: Armando Santos <armando@well-typed.com>
bfe7ce3
to
56473c6
Compare
, Nothing) , Just tdid) -> do | ||
let thread'' = stepThread thread' | ||
control' = advanceControl (threadStepId thread') control | ||
races' = updateRacesInSimState thread' simstate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used to use updateRacesInSimState
only in reschedule
and deschedule
functions, e.g. we only call it when we deschedule a thread. So the question is if it's necessary to have it here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same question, but if you look a few lines above (or in the diff before I changed stuff) when we found a suitable exception handler we call updateRacesInSimState
. So I figured this particular case and the ones below should behave in the same way since in a nutshell we are dealing with particular CatchFrame
s (they are not exactly CatchFrame
s in the sense that one called catch somewhere in the code, but they are implicit catch call)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave that question for @rjmh then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is required anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would still like to hear back from John, but we don't need to be blocked on merging.
Lets consider two concurrent threads which are blocked on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got through the first two commits. Lots of comments.
56473c6
to
65dc1a6
Compare
65dc1a6
to
bfa7957
Compare
bfa7957
to
2e2e00d
Compare
a0b6cea
to
75cf43d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bolt12 I think it's better to make a separate PR out of refactoring the test suite. It requires a bit more work, but we can merge the timeout part.
75cf43d
to
4c83fac
Compare
I removed the refactor commits and move those to #47 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot @bolt12 :)
This is the same as in IntersectMBO/ouroboros-network#3682 but on the new repository
Resolves IntersectMBO/ouroboros-network#3672