rnewson commented on code in PR #4491:
URL: https://github.com/apache/couchdb/pull/4491#discussion_r1144976257
##########
src/couch_index/src/couch_index_server.erl:
##########
@@ -143,8 +144,8 @@ init([N]) ->
by_db = by_db(N)
},
ok = config:listen_for_changes(?MODULE, St),
- couch_event:link_listener(?MODULE, handle_db_event, St, [all_dbs]),
- {ok, St}.
+ {ok, Pid} = couch_event:link_listener(?MODULE, handle_db_event, St,
[all_dbs]),
Review Comment:
I've called start_event_listener but everywhere else (that bothers to keep
track) puts the {ok, Pid} at each call site, so I would rather stick with that.
It doesn't look too pretty to my eyes to write a function like;
```
foo() ->
{ok, Pid} = spawn_link(blah),
Pid.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]