-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve z_check
ambiguity
#492
Comments
for non-blocking channels it is necessary to call z_check on objects returned by try_recv() |
Ok, I see the problem. Separating But the problem remains. The So I have another proposal which doesn't require API change right now. Let's make |
After discussion with @DenisBiryukov91 the proposal is to make Another solution is to declare that |
After discussion with @DenisBiryukov91 and discussion between @DenisBiryukov91 and @Mallets as far as I understand the decision to make Though this raises question about our guarantees about double drop safety and about The double-drop guarantee and the gurantee that failed constructor leaves owned object in safe to drop state are necessary for C++ wrapper. So we have to provide this state and test for this state anyway. So I see no reason to hide this state from user and I think that |
After discussion with @Mallets the final decision is to rename them to |
Describe the release item
The
z_xxx_check
is pair function toz_xxx_null
. It should return "true" if object is in a "null" state.The
z_xxx_null
creates "stub" owned object which isz_drop
operationz_loan
on it may crashThe problem is that for some objects this null/stub state is valid. E.g. empty buffer or default encoding.
The proposal is to make this interface change:
Also it makes sense to get rid of active usage of "z_check" in examples - in most cases error code from constructor is enough
The text was updated successfully, but these errors were encountered: