Details

    • Type: New Feature
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Minor Change
    • # Replies:
      59
    • Last comment by Customer:
      true
    • Epic Link:
    • Sprint:
      C# Sprint 7

      Description

      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.

      1. MongoAsync.cs
        31 kB
        Virgile Bello

        Issue Links

          Activity

          Hide
          andrebires André Bires Fonseca added a comment -

          Yes, its essential to avoid deadlocks when using it with WPF, ASP.Net and
          other applications with custom synchronization contexts.

          Show
          andrebires André Bires Fonseca added a comment - Yes, its essential to avoid deadlocks when using it with WPF, ASP.Net and other applications with custom synchronization contexts.
          Hide
          craiggwilson Craig Wilson added a comment -

          Yes, we have discussed this and will be adding ConfigureAwait everywhere (I think) internally as well. I'll open a ticket to ensure we don't forget. Thanks Ben.

          Show
          craiggwilson Craig Wilson added a comment - Yes, we have discussed this and will be adding ConfigureAwait everywhere (I think) internally as well. I'll open a ticket to ensure we don't forget. Thanks Ben.
          Hide
          craiggwilson Craig Wilson added a comment -

          We are closing this as it is slightly redundant. It fits in with a number of other tickets. This is absolutely a required part of our 2.0 release and we've built in async from the low level core and are building it into a new higher level API. It uses Tasks so that async await is possible. Feel free to keep commenting here if you'd like.

          Show
          craiggwilson Craig Wilson added a comment - We are closing this as it is slightly redundant. It fits in with a number of other tickets. This is absolutely a required part of our 2.0 release and we've built in async from the low level core and are building it into a new higher level API. It uses Tasks so that async await is possible. Feel free to keep commenting here if you'd like.
          Hide
          yaronlevi Yaron Levi added a comment -

          Are there any updates regarding the release date of AWAIT/ASYNC support for the C# driver ?
          It is a really showstopper for us to use mongo in production.

          Show
          yaronlevi Yaron Levi added a comment - Are there any updates regarding the release date of AWAIT/ASYNC support for the C# driver ? It is a really showstopper for us to use mongo in production.
          Hide
          craiggwilson Craig Wilson added a comment -

          Yaron,

          Yes, this ticket will be taken care of in 2.0.0. Currently, it's in beta2 form on nuget or on github. We'd love for you to use it and provide some feedback.

          Craig

          Show
          craiggwilson Craig Wilson added a comment - Yaron, Yes, this ticket will be taken care of in 2.0.0. Currently, it's in beta2 form on nuget or on github . We'd love for you to use it and provide some feedback. Craig

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              7 weeks, 2 days ago
              Date of 1st Reply:

              Agile