Skip to content

Commit 8899752

Browse files
authored
Merge pull request #1837 from mikeblome/mb-sta
fixed user issue with STA
2 parents eb84c44 + 799b8fb commit 8899752

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/parallel/concrt/reference/task-class.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The result of the task.
9696
If the task is canceled, a call to `get` will throw a [task_canceled](task-canceled-class.md) exception. If the task encountered an different exception or an exception was propagated to it from an antecedent task, a call to `get` will throw that exception.
9797

9898
> [!IMPORTANT]
99-
> In a Universal Windows Platform (UWP) app, do not call [concurrency::task::wait](#wait) or `get` ( `wait` calls `get`) in code that runs on the STA. Otherwise, the runtime throws [concurrency::invalid_operation](invalid-operation-class.md) because these methods block the current thread and can cause the app to become unresponsive. However, you can call the `get` method to receive the result of the antecedent task in a task-based continuation because the result is immediately available.
99+
> In a Universal Windows Platform (UWP) app, do not call [concurrency::task::wait](#wait) or `get` ( `wait` calls `get`) in code that runs on the user-interface thread. Otherwise, the runtime throws [concurrency::invalid_operation](invalid-operation-class.md) because these methods block the current thread and can cause the app to become unresponsive. However, you can call the `get` method to receive the result of the antecedent task in a task-based continuation because the result is immediately available.
100100
101101
## <a name="is_apartment_aware"></a> is_apartment_aware
102102

@@ -328,7 +328,7 @@ A `task_status` value which could be either `completed` or `canceled`. If the ta
328328
### Remarks
329329

330330
> [!IMPORTANT]
331-
> In a Universal Windows Platform (UWP) app, do not call `wait` in code that runs on the STA. Otherwise, the runtime throws [concurrency::invalid_operation](invalid-operation-class.md) because this method blocks the current thread and can cause the app to become unresponsive. However, you can call the [concurrency::task::get](#get) method to receive the result of the antecedent task in a task-based continuation.
331+
> In a Universal Windows Platform (UWP) app, do not call `wait` in code that runs on the user-interface thread. Otherwise, the runtime throws [concurrency::invalid_operation](invalid-operation-class.md) because this method blocks the current thread and can cause the app to become unresponsive. However, you can call the [concurrency::task::get](#get) method to receive the result of the antecedent task in a task-based continuation.
332332
333333
## See also
334334

0 commit comments

Comments
 (0)