Skip to content
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

Missing SyncUnsafeCell #333

Open
Pr0methean opened this issue Jan 5, 2024 · 1 comment
Open

Missing SyncUnsafeCell #333

Pr0methean opened this issue Jan 5, 2024 · 1 comment

Comments

@Pr0methean
Copy link

I'm trying to use Loom to test a concurrent byte ring buffer, but it currently doesn't have an equivalent of core::cell::SyncUnsafeCell (which I use to hold the buffer so that the readers and writer can borrow different byte ranges).

NB: This project is also affected by #156, since the writer uses a weak reference to detect when the readers have been dropped.

@taiki-e
Copy link
Member

taiki-e commented Jan 5, 2024

loom does not usually provide an equivalent of the standard library's unstable API. And you can easily implement this by writing a simple wrapper of UnsafeCell.

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

No branches or pull requests

2 participants