Giter Club home page Giter Club logo

Comments (4)

bchavez avatar bchavez commented on June 1, 2024 1

Hi Oliver,

I've pushed RethinkDb.Driver v2.3.101 with the changes that resolves the ConnectAsync timeout issue. Additionally, added support for CancellationToken.

For now, I only added support for timeout and cancellation in ConnectionPool since that looked easiest. However, plumbing CancellationToken and async timeout in Connection looked a bit more involved and carried a higher impact. I'd rather test out the code changes in ConnectionPool first before modifying the more popular Connection object.

Feel free to create an issue for .ConnectAsync in Connection when you really need it.

from rethinkdb.driver.

bchavez avatar bchavez commented on June 1, 2024

Yea, I think the .ConnectAsync methods, in general, ignore timeouts. Looking at Connection and SocketWrapper, the sync .Connect methods are the only ones that respect timeouts.

from rethinkdb.driver.

oliverjanik avatar oliverjanik commented on June 1, 2024

Is it possible to change that?

If I connect using the Aync call on the fly it blocks my request forever.

I find blocking forever on await highly unusual. Most systems seems to throw TaskCancelledException or similar.

from rethinkdb.driver.

bchavez avatar bchavez commented on June 1, 2024

Sure, it's possible to change it. I suppose we could support timeouts on .ConnectAsync but I also suspect the most idiomatic C# thing to do is to support CancellationToken on these async methods as well.

from rethinkdb.driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.