Skip to content

chore: tidy OnceCell code - #76

Merged
tisonkun merged 2 commits into
mainfrom
tidy-oncecell
Nov 25, 2025
Merged

tisonkun merged 2 commits into
mainfrom
tidy-oncecell

Conversation

@tisonkun

Copy link
Copy Markdown
Member

This follows up #69

Signed-off-by: tison <wander4096@gmail.com>
Comment thread mea/src/once/once_cell.rs
value_set: AtomicBool,
value: UnsafeCell<MaybeUninit<T>>,
semaphore: internal::Semaphore,
semaphore: Semaphore,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Previously I was considering using the inernal Semaphore's notify_all method, but it seems a simply P/V pattern is enough here. Switch to the higher level encapsulation.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
tisonkun merged commit e83cbd1 into main Nov 25, 2025
9 checks passed
@tisonkun
tisonkun deleted the tidy-oncecell branch November 25, 2025 04:12
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