-
Notifications
You must be signed in to change notification settings - Fork 0
6 DR 20230809_2
Keywords: architecture, design
Participants: Manuel Hatzl
All subscriptions are stored in two central lists, because a central location allows easier management of subscriptions. Two lists are needed, because one is for subscriptions to specific events, and the other one for subscriptions to all events.
Because the lists are shared globally, it was decided to have a public static variable that is used as publisher. This publisher is used to capture events, and manage subscriptions. The event handler thread, used to forward captured events to subscribers, is created, when creating the publisher.
Note: Since events should also be set on drop, it was decided to use macros to set up all necessary implementations for a new publisher.
Synchronous channels from std::sync::mpsc
are used for communication, because of the assumption that they have the least possible performance impact on capturing side. As mentioned in req:qa.perf, low performance impact on capturing side is more important than on the subscriber side.
Please create an issue if you found any spelling mistakes.
You may also create an issue if you think the content of this wiki should be improved.
Note: This wiki is managed in its own repository. Any commits made using the edit
button will be overwritten.
Note: Issues for the wiki are handled in the evident repository, but pull requests for the wiki are handled in the evident-wiki repository.
This wiki is MIT licensed, and works together with the evident crate.