jonboulle / clockwork

a fake clock for golang
Apache License 2.0
656 stars 57 forks source link

Add SleeperStacks() function to FakeClock to allow for easier debugging. #11

Closed arya closed 6 years ago

jonboulle commented 7 years ago

I guess this was from an old master..? quite a few merge conflicts

arya commented 7 years ago

@jonboulle sorry about that, I had made the changes on my vendored version and just copied clockwork.go over. My bad :) I've fixed it to apply to the latest master.

jonboulle commented 7 years ago

For a little more context would you mind providing an example use case (or linking me to somewhere you're using this?)

arya commented 7 years ago

It's purely for debugging. An example use case is that you have a call to BlockUntil(5) and it sometimes never returns. Using SleeperStacks(), you can see what the current blockers are to confirm they are what you expect or discover that one is missing or that there is an additional one.