mbdavid / LiteDB

LiteDB - A .NET NoSQL Document Store in a single data file
http://www.litedb.org
MIT License
8.5k stars 1.24k forks source link

Why no async methods? #1300

Open pvanroos opened 5 years ago

pvanroos commented 5 years ago

Why not implement async Task in the read and writes? e.g. InsertAsync() or FindByIdAsync()

BTW, love the package! 👍

mbdavid commented 5 years ago

Hi @pvanroos, I was planning to create v5 with only async methods call (useful to use ReadAsync from Stream) but I had a problem: locks works in threads (ReadWriteLockSlim) and has no support for async operations. To works with async locks needs another 3th party lib and v5 still no dependency.

andrewvk commented 4 years ago

https://github.com/rsdn/CodeJam/blob/master/CodeJam.Main/Threading/AsyncLock.cs You may copy source code to your project.

clement128 commented 4 years ago

hi @mbdavid any plan to support async methods?

BTW thanks for the great works

mbdavid commented 4 years ago

Hi @clement128,

Was not possible to implement in v5 because was pretty complex at the moment. But now, with v5 released It's on plans no v.5.5 (next "major" upgrade)

ansarizafar commented 4 years ago

Here is an Aysnc wrapper for liteDb https://github.com/mlockett42/litedb-async

LifshesOfer commented 1 year ago

Hi @mbdavid,

Sorry about necro'ing an old thread, but is there any word about async methods in LiteDB?

mbdavid commented 1 year ago

Hi @LifshesOfer, it's an old thread but still important 😄 !! I'm writing a complete new engine for LiteDB, using only async methods and simple datafile structure. It's in this "temp" repository: https://github.com/mbdavid/LiteDB-vNext

mbdavid commented 1 year ago

Hi @JamesW940516, my plans are release first beta version next month. Maybe 60 days to release final version (if not found any tricky problem 😄)

tinmac commented 10 months ago

@mbdavid Just a quick thank you - appreciate the project & the major async vNext rewrite

mbdavid commented 10 months ago

Hi guys, v6 are not ready yet. I merge my code to dev branch in this repo. I'm almost with database engine... My goal is release in this year the final version