Skip to content

Commit 8f67051

Browse files
committed
Document wait timeout
1 parent bcbc830 commit 8f67051

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ puts counter_after_synced_execution("counter_with_lock", true) # => 2
9898
puts counter_after_synced_execution("counter_without_lock", false) # => 1
9999
```
100100

101+
There's also the possibility of adding a predefined timeout to the wait function and having it raise an exception.
102+
103+
```ruby
104+
process = ForkBreak::Process.new do
105+
sleep(5)
106+
end
107+
108+
process.finish.wait(timeout: 1) # will raise ForkBreak::WaitTimeout after 1 second
109+
```
110+
101111
## Contributing
102112

103113
1. Fork it

0 commit comments

Comments
 (0)