You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
2Yea, I'm aware how to marshall execution between threads. My question is whether or not we should be treating the operations as synchronous methods and letting the UI decide what to put on a background thread (what to execute asynchronously) or do we let the data layer dictate that the operation is asynchronous because we chose to implement the data layer asynchronously.SonOfPirate– SonOfPirate2013-08-02 20:04:30 +00:00Commented Aug 2, 2013 at 20:04
-
1For me, it is always a matter of user experience over "proper code" so it depends on what makes more sense at the time. If the user should have nothing better to do than wait, then I put everything synchronously on the UI layer. If the user has an alternative to waiting, I prefer to keep the operation asynchronous and simply notify the UI (and sometimes the user) when it needs to change. Sometimes it even just boils down to what is easier to implement in the case that some platforms are built to use one of the other, and getting it to do the opposite is difficult.CuddleBunny– CuddleBunny2013-08-05 21:01:31 +00:00Commented Aug 5, 2013 at 21:01
-
What if the UI has nothing better to do than wait, but new circumstances ( phone call canceling the order to do something ) allow the user to cancel the async process. Keeping the UI responsive is still important even if don't think there is any other way to proceed, no?.Andyz Smith– Andyz Smith2013-09-02 15:37:32 +00:00Commented Sep 2, 2013 at 15:37
-
Yes, that is correct. Before you make something synchronous you should always think of every possible circumstance in which the user would not want to just wait. Nine times out of ten I make async calls but there are always a few edge cases in which you want an operation to be unstoppable and force the user to wait before continuing. A good example would be the synchronous loading of fonts and modules when MS Word loads. The application is pointless without those items and therefore the user must wait for them before interacting with the application.CuddleBunny– CuddleBunny2013-09-02 15:44:18 +00:00Commented Sep 2, 2013 at 15:44
Add a comment
|
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
-
create code fences with backticks ` or tildes ~
```
like so
``` -
add language identifier to highlight code
```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible)
<https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you