mike-jumper commented on code in PR #456:
URL: https://github.com/apache/guacamole-server/pull/456#discussion_r1309085093
##########
src/common/common/cursor.h:
##########
@@ -123,6 +123,14 @@ typedef struct guac_common_cursor {
*/
guac_timestamp timestamp;
+ /**
+ * Lock which restricts simultaneous access to the cursor, guaranteeing
+ * ordered modifications to the cursor and that incompatible operations
+ * do not occur simultaneously. This lock is for internal use within the
+ * cursor only.
+ */
+ pthread_mutex_t lock;
Review Comment:
Yes and no:
All private structure members within the public API should have single
underscore prefixes so that they are ignored by Doxygen. It matters less in the
internal convenience libraries which are not part of libguac, as the entirety
of their APIs is private, but I'd agree that it's good to do so since it helps
communicate how the structure is intended to be used.
It's _technically_ incorrect for us to use double-underscore prefixes for
any identifiers, as that prefix is reserved for the C compiler, but you'll find
that in much of the older code. As new code, if this were part of the public
API, the member should be named `_lock`.
--
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]