Skip to content

Commit

Permalink
Made the ReadAsync, non locking instead of Write
Browse files Browse the repository at this point in the history
  • Loading branch information
Clancey committed Aug 11, 2017
1 parent 841427a commit 5476d98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SQLiteAsync.cs
Expand Up @@ -185,7 +185,7 @@ public Task CloseAsync ()
Task<T> ReadAsync<T> (Func<SQLiteConnectionWithLock, T> read)
{
return Task.Factory.StartNew (() => {
var conn = GetConnection ();
var conn = isFullMutex ? _connection : GetConnection ();
using (conn.Lock ()) {
return read (conn);
}
Expand All @@ -195,7 +195,7 @@ Task<T> ReadAsync<T> (Func<SQLiteConnectionWithLock, T> read)
Task<T> WriteAsync<T> (Func<SQLiteConnectionWithLock, T> write)
{
return Task.Factory.StartNew (() => {
var conn = isFullMutex ? _connection : GetConnection ();
var conn = GetConnection ();
using (conn.Lock ()) {
return write (conn);
}
Expand Down

0 comments on commit 5476d98

Please sign in to comment.