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

remove tokio sync primitives #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevefan1999-personal
Copy link

As per #80, this PR will attempt to remove Tokio related sync primitives with async_mutex and async_semaphore.

Technically speaking, the behavior shouldn't be that much differed, the few things that needs to be taken noticed on is only in fairness guarantee, whether one mutex lock would starve another, and whether or not two mutex lock re-entrancy would cause a live-lock or not.

As for async_semaphore, I noticed how the "write lock" for the oracle doesn't need a lock at all; it just need a critical section to prevent concurrent access. While I couldn't find any async critical section crate, I think replacing it with a semaphore would better indicate its functionality, hence the change.

@arriqaaq
Copy link
Contributor

arriqaaq commented Oct 2, 2024

Hey @stevefan1999-personal

Sorry for the late reply, and thank you for these suggestions on surrealkv. I think they would be useful in the long run. Perhaps we can add them in a future milestone once everything is stable and working as expected, as we do not want to introduce any large breaking change at this time. I'll keep them open for now and maybe add it for a future milestone

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