You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/04/07 13:22:08 UTC

[GitHub] [couchdb] iilyak commented on a diff in pull request #3987: Fix busy functions to work with pids

iilyak commented on code in PR #3987:
URL: https://github.com/apache/couchdb/pull/3987#discussion_r845128888


##########
src/couch/src/couch_debug.erl:
##########
@@ -281,18 +285,20 @@ help(Unknown) ->
     io:format("    ---~n", []),
     ok.
 
--spec busy(ProcessList :: [process_name()], Threshold :: pos_integer()) ->
+-spec busy([process_name()] | pid(), Threshold :: pos_integer()) ->

Review Comment:
   This is not the intend. The intend is to make the following spec possible.
   
   ```
   -spec busy([process_name() | pid()], Threshold :: pos_integer()) ->
       [Process :: process_name() | pid()].
   ```
   
   And to make it clearer and allow re-usability of a type we can define it as.
   
   ```
   -type process_name() :: atom().
   -type process() :: process_name() | pid().
   ....
   
   -spec busy([process()], Threshold :: pos_integer()) ->
       [Process :: process()].
   ```
   



-- 
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: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org