Commit b26907ea authored by Christopher Kuklewicz's avatar Christopher Kuklewicz Committed by Facebook GitHub Bot

Improve documentation comments on EventBaseManager

Summary:
# What is the goal?

Address the problem in the post at https://fb.workplace.com/groups/code.indexing/permalink/1929080303917865/ with the comment(s) in Codex for EventBaseManager.

# What was not the way?

Jie Jua noticed that the current comment on "EventBaseManager() {}" in Codex was

```
encouraged. You should instead use the global singleton if possible.
```

# What is the new way?

Use documentation comments (doxygen) style `/** double starts */` instead of `//` ordinary comments. This should show the full comment which is:

```
XXX Constructing a EventBaseManager directly is DEPRECATED and not
encouraged. You should instead use the global singleton if possible.
```

Which really needs that first line.

Differential Revision: D24333522

fbshipit-source-id: 8e84e0a49426844d5a6f6438b0d76fb9886742fe
parent 53947e04
...@@ -35,8 +35,10 @@ namespace folly { ...@@ -35,8 +35,10 @@ namespace folly {
*/ */
class EventBaseManager { class EventBaseManager {
public: public:
// XXX Constructing a EventBaseManager directly is DEPRECATED and not /**
// encouraged. You should instead use the global singleton if possible. * XXX Constructing a EventBaseManager directly is DEPRECATED and not
* encouraged. You should instead use the global singleton if possible.
*/
EventBaseManager() {} EventBaseManager() {}
explicit EventBaseManager(folly::EventBaseBackendBase::FactoryFunc func) explicit EventBaseManager(folly::EventBaseBackendBase::FactoryFunc func)
...@@ -143,12 +145,14 @@ class EventBaseManager { ...@@ -143,12 +145,14 @@ class EventBaseManager {
mutable folly::ThreadLocalPtr<EventBaseInfo> localStore_; mutable folly::ThreadLocalPtr<EventBaseInfo> localStore_;
// set of "active" EventBase instances /**
// (also see the mutex "eventBaseSetMutex_" below * Set of "active" EventBase instances
// which governs access to this). * (also see the mutex "eventBaseSetMutex_" below
* which governs access to this).
*/
mutable std::set<EventBase*> eventBaseSet_; mutable std::set<EventBase*> eventBaseSet_;
// a mutex to use as a guard for the above set /// A mutex to use as a guard for the above "eventBaseSet_"
std::mutex eventBaseSetMutex_; std::mutex eventBaseSetMutex_;
std::shared_ptr<folly::EventBaseObserver> observer_; std::shared_ptr<folly::EventBaseObserver> observer_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment