Giter Site home page Giter Site logo

Comments (4)

aritchie avatar aritchie commented on June 11, 2024

You don't need this with reactive extensions. You can chain .Timeout(TimeSpan.FromSeconds(5)).ToTask()

from shiny.

JVanloofsvelt avatar JVanloofsvelt commented on June 11, 2024

Hello aritchie. It is inside the implementation of this extension method that ToTask() is used, and there is no use of the Rx Timeout operator there.

While I can use another timeout operator on the observable that is returned from this method, like you suggest, the internals of the observable use this task returned from ToTask() that never completes , and hence doesn't stop the GPS manager or releases the semaphore .

See here for the implementation:
https://github.com/shinyorg/shiny/blob/master/src/Shiny.Locations/Extensions.cs

from shiny.

aritchie avatar aritchie commented on June 11, 2024

There is a cancellation token that is watched on the semaphore and the totask listener.

This is just an extension method, you can write your own if you feel it isn't working.

from shiny.

JVanloofsvelt avatar JVanloofsvelt commented on June 11, 2024

Oh I hadn't noticed the cancellation token being passed to ToTask()! Makes sense then

Thanks

from shiny.

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.