I would just like to find out the recommended way of implementing async support. I read #124 and im not fully sure if creating a task is the correct approach.
Thanks in advance
Hi @AlucardLO, LiteDB works only with native class sync calls. There is no "ReadAsync" or "WriteAsync" method used in FileStream because LiteDB still works with NET35.
If you want/need async task, you must use Task class to encapsulate method call. But I don't know if you will have any advantage. Also, in this case, use a single LiteDatabase instance between threads.
In next v5 version, write operation will run over memory async queue.
Thanks for the quick reply @mbdavid
Ill implement v4 so long and once v5 is available I'll swap over.
Hello, any release day planned for v5?
Just wanted to reach out in regards to v5.5 which is planned to include asynchronous support. Will this include asynchronous contexts inside object mappers as well? @mbdavid
Most helpful comment
Hi @AlucardLO, LiteDB works only with native class sync calls. There is no "ReadAsync" or "WriteAsync" method used in FileStream because LiteDB still works with NET35.
If you want/need async task, you must use
Taskclass to encapsulate method call. But I don't know if you will have any advantage. Also, in this case, use a single LiteDatabase instance between threads.In next v5 version, write operation will run over memory async queue.