You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2020/04/27 19:18:01 UTC

[GitHub] [trafficserver] a-canary opened a new pull request #6712: Commenting EventIO methods

a-canary opened a new pull request #6712:
URL: https://github.com/apache/trafficserver/pull/6712


   with doxygen style comments


----------------------------------------------------------------
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.

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



[GitHub] [trafficserver] SolidWallOfCode commented on a change in pull request #6712: Commenting EventIO methods

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on a change in pull request #6712:
URL: https://github.com/apache/trafficserver/pull/6712#discussion_r416697784



##########
File path: iocore/net/P_UnixNet.h
##########
@@ -98,14 +100,37 @@ struct EventIO {
   int start(EventLoop l, NetAccept *vc, int events);
   int start(EventLoop l, NetEvent *ne, int events);
   int start(EventLoop l, UnixUDPConnection *vc, int events);
+  /** Setup a continuation to be called when a file descriptor is available for read or write.
+     @param l: the event loop
+     @param fd: file descriptor (or port)
+     @param c: the continuation to call
+     @param events: a mask of flags (for details `man epoll_ctl`)
+     @return int: the number of events created, -1 is error
+   */
   int start(EventLoop l, int fd, Continuation *c, int events);
-  // Change the existing events by adding modify(EVENTIO_READ)
-  // or removing modify(-EVENTIO_READ), for level triggered I/O
+
+  /** Alter the events that will trigger the continuation, for level triggered I/O.
+     @param events: add with positive mask(+EVENTIO_READ), or remove with negative mask (-EVENTIO_READ)
+     @return int: the number of events created, -1 is error
+   */
   int modify(int events);
-  // Refresh the existing events (i.e. KQUEUE EV_CLEAR), for edge triggered I/O
+
+  /** Refresh the existing events (i.e. KQUEUE EV_CLEAR), for edge triggered I/O
+     @param events: mask of events

Review comment:
       Don't use colon as a separator. Space suffices.




----------------------------------------------------------------
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.

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



[GitHub] [trafficserver] SolidWallOfCode commented on a change in pull request #6712: Commenting EventIO methods

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on a change in pull request #6712:
URL: https://github.com/apache/trafficserver/pull/6712#discussion_r416699943



##########
File path: iocore/net/P_UnixNet.h
##########
@@ -506,9 +531,7 @@ check_transient_accept_error(int res)
   }
 }
 
-//
-// Disable a NetEvent
-//
+/// Disable the read epoll on a NetEvent

Review comment:
       This needs a lot more detail.
   ```
   /** Disable reading on the NetEvent @a ne
        @param nh Nethandler that owns @a ne
        @param ne The @c NetEvent to modify.
   
        - If write is already disable, also disable the inactivity timeout.
        - Remove the @c epoll READ flag.
        - Take @a ne out of the read ready list.
   */ 
   ```




----------------------------------------------------------------
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.

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



[GitHub] [trafficserver] SolidWallOfCode commented on a change in pull request #6712: Commenting EventIO methods

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on a change in pull request #6712:
URL: https://github.com/apache/trafficserver/pull/6712#discussion_r416697511



##########
File path: iocore/net/P_UnixNet.h
##########
@@ -98,14 +100,37 @@ struct EventIO {
   int start(EventLoop l, NetAccept *vc, int events);
   int start(EventLoop l, NetEvent *ne, int events);
   int start(EventLoop l, UnixUDPConnection *vc, int events);
+  /** Setup a continuation to be called when a file descriptor is available for read or write.
+     @param l: the event loop
+     @param fd: file descriptor (or port)
+     @param c: the continuation to call
+     @param events: a mask of flags (for details `man epoll_ctl`)
+     @return int: the number of events created, -1 is error
+   */
   int start(EventLoop l, int fd, Continuation *c, int events);
-  // Change the existing events by adding modify(EVENTIO_READ)
-  // or removing modify(-EVENTIO_READ), for level triggered I/O
+
+  /** Alter the events that will trigger the continuation, for level triggered I/O.
+     @param events: add with positive mask(+EVENTIO_READ), or remove with negative mask (-EVENTIO_READ)
+     @return int: the number of events created, -1 is error
+   */
   int modify(int events);
-  // Refresh the existing events (i.e. KQUEUE EV_CLEAR), for edge triggered I/O
+
+  /** Refresh the existing events (i.e. KQUEUE EV_CLEAR), for edge triggered I/O
+     @param events: mask of events
+     @return int: the number of events created, -1 is error
+   */
   int refresh(int events);
+
+  /** Remove the kernal or epoll event.
+     @return int: 0 on success, -1 on error
+   */
   int stop();
+
+  /** Remove the epoll event and close the connection.
+     @return int: 0 on success, -1 on error

Review comment:
       Don't put the return type in the `@return` - Doxygen knows the return type and will handle that for you.




----------------------------------------------------------------
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.

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



[GitHub] [trafficserver] zwoop commented on pull request #6712: Commenting EventIO methods

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #6712:
URL: https://github.com/apache/trafficserver/pull/6712#issuecomment-655174644


   Need this into 9.0.0, to avoid merge conflicts from other PRs that needs to go there.
   
   Cherry-picked to v9.0.x branch.


----------------------------------------------------------------
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.

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