-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
C# 5.0 is all about making asynchronous programming a first class citizen of the language. Also, writing scalable server applications requires using only asynchronous I/O. This can only be done if the MongoDB driver exposes asynchronous operations for querying the database.
In order to make it compatible with what C# 5.0 will be using, those APIs will need to use the task based pattern, and return Task<T>.
For exemple,
public MongoCursor<TDefaultDocument> Find(IMongoQuery query)
would have an asynchronous equivalent:
public Task<MongoCursor<TDefaultDocument>> FindAsync(IMongoQuery query)
The resulting task represents a token for asynchronous completion of the operation.
The driver exposes lots of I/O operations, but having the most used ones (Find, FindOne, Insert...) implemented first that way would go a long way.
- depends on
-
CSHARP-1051 Ensure ConfigureAwait is used internally on awaited async calls
- Closed
- is related to
-
CSHARP-544 Asynchronous I/O while inserting documents
- Closed
- related to
-
CSHARP-914 Possibility to
- Closed