Skip to content

more words about what Accessor is about#1084

Open
iximeow wants to merge 1 commit intomasterfrom
ixi/accessor-words
Open

more words about what Accessor is about#1084
iximeow wants to merge 1 commit intomasterfrom
ixi/accessor-words

Conversation

@iximeow
Copy link
Member

@iximeow iximeow commented Mar 19, 2026

i'm decreasingly burdened by awareness of my sinuses, and managed to put words together yesterday! yay!

talking with a few folks since ~January has both helped me better describe why the accessor stuff is how it is, and how authors of code in the Propolis library crate might want to think about it. also, in those conversations it became very clear that putting that to words in a module comment would have been helpful to people trying to figure out how to use this right.

so, hopefully i've channeled Patrick satisfactorily and folks find this enlightening. this is, at the least, how i find myself thinking about it!

@iximeow iximeow added the development Relating to engineering experience and development of propolis, not guest or product interfaces label Mar 19, 2026
/// `access_locked()`, and *may* block attempts to `access()` or
/// `access_locked()` a child of this node. Holding this guard will block
/// removal of the underlying resource, potentially blocking VM teardown.
pub fn access_locked(&self) -> Option<LockedView<'_, T>> {
Copy link
Member Author

Choose a reason for hiding this comment

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

this is partially motivated by #1080, in that in retrospect i don't think access_borrow() at the caller side really communicates that an access() -> access_borrow() diff really changes the caller's relationship with accessor node locking. this hopefully encourages more scrutiny of such a change (and the additional words should ward away uses without good rationale)

@iximeow iximeow requested a review from hawkw March 19, 2026 17:31
@iximeow
Copy link
Member Author

iximeow commented Mar 19, 2026

(i'd mentioned to Eliza i was trying to put this to words a bit ago, but i'd appreciate eyes from anyone who's been looking the word accessor and trying to divine what's going on!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development Relating to engineering experience and development of propolis, not guest or product interfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant