You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would adding an option to have an async version via something like maybe_async make sense?
I want to implement this since I want to use this database but I want to use it in an async context and doing tokio::spawn_blocking or similar for every db call doesn't feel right.
The text was updated successfully, but these errors were encountered:
Hey @ozgrakkurt, this isn't a bad idea, but it only makes sense for writes.
All reads are done to a memory map, so there is nothing to do asyncronously. When we try to read from a memory address, if that page isn't in memory we will just get a page fault and the OS will load that in. There's no way to "asyncify" that.
Writes are done directly to the file though, so the commit method on the transaction could be async. It shouldn't be difficult, I just haven't gotten around to doing this yet. Are you interested in giving it a try?
Hey!
Would adding an option to have an async version via something like
maybe_async
make sense?I want to implement this since I want to use this database but I want to use it in an async context and doing
tokio::spawn_blocking
or similar for every db call doesn't feel right.The text was updated successfully, but these errors were encountered: