TutRwMutexSetReadQuota set the simultaneous reader quota of a R/W mutex
rw_mutex
R/W mutex object to update
read_quota
number of simultaneous readers to be supported
TRUE
if the operation was successful, FALSE
otherwise.
If TutRwMutexSetReadQuota fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TutRwMutexSetReadQuota can be used to reset the reader quota assigned to a R/W mutex. The quota tracks the number of reader-threads that have locked a R/W mutex concurrently. In some circumstances it may be desirable to reset the quota to a baseline value after it has grown dynamically, or to increase it in a single operation in anticipation of an increase in concurrent utilization. The valid range is from 1 to T_MAX_READ_QUOTA, inclusive.
TutRwMutexSetReadQuota obtains a write-lock on the R/W mutex before it changes the quota.
TutRwMutexCreate, TutRwMutexGetReadQuota, TutRwMutexReadLock
This example sets the reader quota of the R/W mutex to 8
:
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |