Skip to content

invokeOnewayImpl是否有必要使用SemaphoreReleaseOnlyOnce? #6848

Answered by xiaoyifang
2335119327 asked this question in Q&A
Discussion options

You must be logged in to vote

能否直接使用try-catch-finally?在finally中进行release即可。

应该不能, 看原逻辑,正常release是在异步回调里执行的。
如果在finally里释放,会造成提前释放。

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@xiaoyifang
Comment options

Answer selected by 2335119327
@2335119327
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants