Comments (2)
The only reason I can envision for this to happen is if a) System.Reactive.PlatformServices.dll is not deployed alongside your application and b) you're running on a platform where the TPL does not have proper support for stack probing to avoid stack overflows.
What happens here is that System.Reactive.Core uses the Concurrency Abstraction Layer (CAL) to run a timer for the TimeSpan obtained from the Generate time selector function. If you're using the Portable Library version of Rx, the default implementation uses Task.Delay to run a timer. That is, unless the Platform Enlightenment Provider succeeds to load System.Reactive.PlatformServices.dll for your specific target platform, i.e. from the binaries deployed alongside your application. If such a custom set of enlightenments is retrieved, behavior could be upgraded to use System.Threading.Timer instead.
However, if the default behavior is used, Task.Delay for anything less than a millisecond will return a task that completes immediately. The timer appends a continuation with the ExecuteSynchronously flag set to the delayed task. In case the task completes immediately, that causes the continuation to run inline, hence growing the stack. For all modern desktop platforms, the TPL has functionality to use a "stack guard" to check whether there's enough stack space left. If not, it will not honor the request to execute synchronously and will jump to a different threadpool thread instead. If stack probing isn't present (e.g. because there's no P/Invoke to the underlying Win32 APIs, something being addressed in Core CLR by adding runtime support to do the checks), there may be an overflow. I need to double-check which platforms could be affected by this.
If you could provide more information on the platform used and the application configuration (i.e. whether you're using the Portable Library build with or without a PlatformServices copy alongside of it), that'd be helpful to get to the root cause.
from reactive.
We checked a couple of different configurations but couldn't reproduce the issue. Closing it for now. Feel free to reopen if you got more information that'd help to repro.
from reactive.
Related Issues (20)
- Add BackOffRetry example in IntroToRx
- Fix sentence on IntroToRx book
- [Feature] GroupSequentialBy
- PageNotFoundError about https://www.reactiveui.net/slack HOT 2
- Referencing System.Reactive from a WinUI 3 app or library is causing XLS errors to display in VS while XAML files are open HOT 1
- Possible Deadlock in BehaviorSubject.Subscribe HOT 2
- Incorporate https://github.com/runceel/ReactiveProperty HOT 5
- Throttle breaks the observable chain while running on wasm in .net 8 HOT 5
- Issue with CancellationToken lifetime in Observable.Using (async version) HOT 1
- Window and Buffer operators omit items which are released immediately HOT 5
- Benchmarks don't run for .NET 6+
- TestScheduler WithAsync swallows all exceptions making all tests pass HOT 3
- Publish symbols for assemblies in this package HOT 1
- Union doesn't dispose enumerator for empty lists HOT 1
- IntroToRx recommends wrong Window overload
- Fully update Ix for .NET SDK 8.0 HOT 1
- Bug in Merge for USE_FAIR_AND_CHEAPER_MERGE HOT 4
- ToAsyncEnumerable_Observable_Cancel_InFlight sometimes fails spuriously
- Do operator can perform unexpected type conversion on observable sequence HOT 2
- Feature Request: Make `AsyncGate.LockAsync` cancellable HOT 4
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 reactive.