Skip to content

Update tryAcquireShared Returns#1756

Merged
Snailclimb merged 1 commit intoSnailclimb:mainfrom
chang-kun:patch-1
Jun 28, 2022
Merged

Update tryAcquireShared Returns#1756
Snailclimb merged 1 commit intoSnailclimb:mainfrom
chang-kun:patch-1

Conversation

@chang-kun
Copy link
Copy Markdown
Contributor

Returns:
a negative value on failure; zero if acquisition in shared mode succeeded but no subsequent shared-mode acquire can succeed; and a positive value if acquisition in shared mode succeeded and subsequent shared-mode acquires might also succeed, in which case a subsequent waiting thread must check availability. (Support for three different return values enables this method to be used in contexts where acquires only sometimes act exclusively.) Upon success, this object has been acquired.

Returns:
a negative value on failure; zero if acquisition in shared mode succeeded but no subsequent shared-mode acquire can succeed; and a positive value if acquisition in shared mode succeeded and subsequent shared-mode acquires might also succeed, in which case a subsequent waiting thread must check availability. (Support for three different return values enables this method to be used in contexts where acquires only sometimes act exclusively.) Upon success, this object has been acquired.
@Snailclimb Snailclimb merged commit f3740d1 into Snailclimb:main Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants