Skip to content

Commit

Permalink
Add note about returning returns
Browse files Browse the repository at this point in the history
Making sure the API is clearer in the README for users who want to get the results from the background sampler
  • Loading branch information
AlexAndorra authored Aug 27, 2024
1 parent cc34b58 commit f5b686a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ sampler.pause()
sampler.resume()

# Wait for the sampler to finish (up to timeout seconds)
# sampler.wait(timeout=0.1)
sampler.wait(timeout=0.1)
# Note that not passing any timeout to `wait` will
# directly save and return the results:
idata = sampler.wait()

# or we can also abort the sampler (and return the incomplete trace)
incomplete_trace = sampler.abort()
Expand Down

0 comments on commit f5b686a

Please sign in to comment.