Giter VIP home page Giter VIP logo

Comments (3)

abelbraaksma avatar abelbraaksma commented on June 18, 2024

See #16.

from fsharp.control.taskseq.

abelbraaksma avatar abelbraaksma commented on June 18, 2024

As per the referenced PR #17, and this MSDN article on Task.Delay, quote:

This method depends on the system clock. This means that the time delay will approximately equal the resolution of the system clock if the millisecondsDelay argument is less than the resolution of the system clock, which is approximately 15 milliseconds on Windows systems.

we can conclude: for smoke-testing randomly delayed tasks, this method may not be ideal. In #17 I'm introducing an alternative method, which has its own drawbacks, but for now it suffices.

Why these random delays?

Well, just writing this for posterity to myself, as for sure I'm gonna forget. We use this randomness to force wrong results if mutable data inside the tasks are accidentally run in the wrong order. A couple of tests show-case this scenario specifically, which happens if you treat List<task<''T>> incorrectly. See the PoC tests that test the "wrong way" to do this (which, unfortunately, happens quite often in code in the wild..., waiting to randomly crash).

More importantly, if we make a mistake in the resumable code, this method is quite likely to catch it.

from fsharp.control.taskseq.

abelbraaksma avatar abelbraaksma commented on June 18, 2024

This has been fixed in #17, see there for some more insights.

from fsharp.control.taskseq.

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.