[][src]Function hiatus::step

pub fn step<'a>(n: u64) -> Step<'a>

Set a breakpoint in your program to control its execution.

Calling step(n) will block the program until all previous step calls have resolved.

The first step of your program should be step(1).

How it works

Hiatus maintains a global step counter, which is incremented each time a Step object returned by step is dropped. When step(n) is called, it blocks the current thread until the global step count is equal to n, at which point that thread is unblocked and allowed to execute. To signal to other threads that the current step is complete, you should drop the Step object. You can do this immediately if you want, or you can wait until some block of code has finished executing. See Step::then.

Warnings

Make sure you enable Hiatus by calling enable first!

It's probably not a good idea to have multiple calls for the same step count in the same program. It likely won't do anything sensible (I haven't tried it).