jmuehlner commented on code in PR #455:
URL: https://github.com/apache/guacamole-server/pull/455#discussion_r1303571944
##########
src/libguac/guacamole/client.h:
##########
@@ -162,14 +173,65 @@ struct guac_client {
* Lock which is acquired when the users list is being manipulated, or when
* the users list is being iterated.
*/
- pthread_rwlock_t __users_lock;
+ guac_local_lock __users_lock;
/**
* The first user within the list of all connected users, or NULL if no
* users are currently connected.
*/
guac_user* __users;
+ /**
+ * Lock which is acquired when the pending users list is being manipulated,
+ * or when the pending users list is being iterated.
+ */
+ guac_local_lock __pending_users_lock;
+
+ /**
+ * A timer that will periodically synchronize the list of pending users,
+ * emptying the list once synchronization is complete. Only for internal
+ * use within the client. This will be NULL until the first user joins
+ * the connection, as it is lazily instantiated at that time.
+ */
+ timer_t __pending_users_timer;
+
+ /**
+ * Non-zero if the pending users timer is configured and running, or zero
+ * otherwise.
+ */
+ int __pending_users_timer_running;
+
+ /**
+ * A mutex that must be acquired before modifying the pending users timer.
+ */
+ pthread_mutex_t __pending_users_timer_mutex;
+
+ /**
+ * Notification / signaling configuration for the pending users timer.
+ * Only for internal use within the client. This will be NULL until the
+ * first user joins the connection.
+ */
+ struct sigevent __pending_users_timer_signal_config;
+
+ /**
+ * Specification for the timing of the pending users timer. Only for
+ * internal use within the client. This will be NULL until the
+ * first user joins the connection.
+ */
+ struct itimerspec __pending_users_time_spec;
+
+ /**
+ * A flag that indicates whether the pending users timer event thread is
+ * currently running.
+ */
+ volatile atomic_flag __pending_timer_event_active;
Review Comment:
Yes it would.
--
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]