Comments (3)
This doesn't offer anything new and could be easier implemented via OfAsync.perform
, which I'd actually suggest using instead because it allows for separation between async/IO interface and application messaging as well as correct point of composition for the two.
There's also an open item to re-work how subscriptions work, so that's another reason to use these kinds of functions instead of building on Sub
directly.
from elmish.
The difference is in how the computation is started, recall that async
in F#, unlike promise
or task
is "cold", ie. it's a computation in potentia, ie. not running until you explicitly start it. StartImmediate
uses current thread to start running a computation, while Start
schedules it to run on the background thread. You decide if you want it "at some point later", or you want it to preempt anything else (at least until it hits IO API that will schedule continuation on the background thread regardless).
from elmish.
When would I use Cmd.OfAsync.perform
or Cmd.OfAsyncImmediate.perform
?
from elmish.
Related Issues (20)
- Can multiple Elmish "programs" be instantiated in a single application? HOT 5
- Expose Program module functions as C#/VB compatible extension methods HOT 6
- Subscribe to DOM events via `Program.withSubscription` HOT 2
- How to pass an external event into a program? HOT 30
- Ability to stop subscriptions HOT 9
- Cmd helpers for checking success by option HOT 4
- Double subscribe when dispatching during sub startup
- None of the duplicate subscriptions should be started HOT 12
- Subscription doc updates for v4
- Is there an expected time to get to a stable version of v4 HOT 2
- Elmish for WebSharper apps HOT 4
- Question about FSharp.Core version HOT 4
- Cmd.OfFunc.whatever HOT 9
- Docs: String.replicate piece raises an exception HOT 1
- Remove redundant Subscription trace logs HOT 7
- Replacement with ofEffect for ofSub not working as in v3? HOT 3
- Proposal: port Elm's virtual dom to work with Feliz HOT 4
- [Question] Elmish way of disposing component dependencies HOT 1
- Suggestion: Cmd.OfTask.attempt with untyped Task HOT 1
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 elmish.