Comments (3)
See #16.
from fsharp.control.taskseq.
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.
This has been fixed in #17, see there for some more insights.
from fsharp.control.taskseq.
Related Issues (20)
- Consider `StartImmediateAsTask` instead of `StartAsTask` to prevent a thread hop HOT 3
- The file `release-notes.txt` shows up in the content files dependencies graph HOT 1
- TaskEx index
- TaskEx: ignore
- TaskEx: AwaitTaskCorrect / Task.toAsync / Async.ofTask
- TaskEx: Async.startImmediateAsTask
- TaskEx: parallelLimit
- Disposal is not called with `use!` and the like HOT 1
- Release version 0.4.0-alpha.1
- Warnings NU1605 when building test project HOT 1
- Support `ConfiguredCancelableAsyncEnumerable<'T>` HOT 5
- CancellationToken not used/registered HOT 5
- Move to static members and overloads, to support cancellation token passing, `ValueTask` and `Async` in the module members HOT 2
- Deprecate some oddly named utility functions and replace with more sensible naming, deprecate type `taskSeq<_>` for `TaskSeq<_>`
- Warning NU1608 with current version if FsUnit.xUnit
- Implement functions `TaskSeq.skip`, `skipWhile`, `where`, `truncate`, `take`, `insertAt`, `updateAt`, `forall`, `concat` (seq) HOT 1
- Documentation says there's a `TaskSeq.toAsyncSeq` function, but it does not exist
- Revisit upgrading to the problematic `actions/upload-artifact@v4`
- Implement dynamic versions of the resumable code
- Unintended object inference HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.control.taskseq.