Skip to content

Commit 1fe1f18

Browse files
authored
Update README.md (#24)
1 parent e582657 commit 1fe1f18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,17 @@ void example() {
4141
eventB.emit("meaning of life", 42);
4242

4343
// `observe::Observer` can store any type of observer
44+
// previous observers will be removed
4445
observer.observe(eventA, [](){ std::cout << "I am now observing A" << std::endl; });
4546

4647
// to remove an observer without destroying the object, call reset
4748
observer.reset();
4849
}
4950
```
5051

51-
Note that events and observers are thread and exception safe, though any thrown exception will propagate out of the `event.emit()` call.
52+
Note that events and observers are thread and exception safe, as long as the handlers manage their own resources.
53+
Handlers can safely remove observers (including themselves) from the event when beeing called.
54+
Thrown exceptions will propagate out of the `event.emit()` call.
5255

5356
### Using observe::Value
5457

0 commit comments

Comments
 (0)