Skip to content

Conversation

@afiffon
Copy link
Owner

@afiffon afiffon commented Aug 7, 2025

This is for Resource only, since resource is the most instantiated structure that causes this issue.

In the future, if needed, the same technique can be applied to connection, session, and tree.

@afiffon afiffon self-assigned this Aug 7, 2025
@afiffon afiffon linked an issue Aug 7, 2025 that may be closed by this pull request
@afiffon afiffon force-pushed the 106-change-async-drop-behavior branch 2 times, most recently from 407c2ed to 1d4c178 Compare August 7, 2025 16:13
@afiffon afiffon force-pushed the 106-change-async-drop-behavior branch from 1d4c178 to 50be631 Compare August 7, 2025 16:26
fmt: normalize (Internal):\n\n comments
Copy link
Contributor

@cjbradfield cjbradfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're keeping the atomics, just a few changes to the Ordering and a nit on preferring exchange to compare_exchange since you definitely want to set open to false.

Add debug assertions for the case.

due to latest changes in how closing work, this issue raised and broke tests.
@afiffon afiffon force-pushed the 106-change-async-drop-behavior branch from d273f9a to 61c27d4 Compare August 7, 2025 19:52
@afiffon afiffon enabled auto-merge August 7, 2025 19:52
cjbradfield added a commit to cjbradfield/smb-rs that referenced this pull request Aug 7, 2025
Remove changes to Resource since those are handled in afiffon#108 and
in smb_client as implementing Drop on the above solves the problem
more effectively.
@afiffon afiffon force-pushed the 106-change-async-drop-behavior branch 2 times, most recently from 5facc54 to 605764a Compare August 8, 2025 08:16
Relaxed order instead of SeqCst in `ResourceHadnle::open`
@afiffon afiffon force-pushed the 106-change-async-drop-behavior branch from 605764a to e819678 Compare August 8, 2025 08:37
@afiffon afiffon merged commit 5446b1d into main Aug 8, 2025
3 checks passed
@afiffon afiffon deleted the 106-change-async-drop-behavior branch August 8, 2025 10:55
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.

Change async Drop behavior

3 participants