Index of 5.0 Topics

Operators

.... (periods), download progress indicator, 779

A

AggregateException, 762765

AggregateException.Flatten() method, 780

AggregateException.Handle() method, 764, 780

Anonymous functions, guidelines, 533

Antecedent tasks, 757

AspNetSynchronizationContext, 794

async keyword

purpose of, 786

task-based asynchronous pattern, 781786, 795798

Asynchronous

continuations, 756762

high-latency operations with the TPL, 777781

lambdas, 786787

tasks. See Multithreading, asynchronous tasks.

AttachedToParent enum, 758

await keyword, task-based asynchronous pattern, 781786, 791792, 795798

await operators, task-based asynchronous pattern, 797798

B

Break() method, 808

Breaking parallel loop iterations, 808

C

Canceling

cooperative cancellation, 769

multithreading, PLINQ queries, 811813

parallel loop iterations, 805806

tasks. See Multithreading, canceling tasks.

CancellationToken object, 769772

CancellationTokenSource.Cancel() method, 770771

Capturing loop variables with lambda expressions, 531533

Chaining tasks, 757

Composing large tasks from smaller one, 756758

Continuation tasks, 757

ContinueWith() method, 756758, 760761, 764765, 779

Control flow

misconceptions, 784

multithreading asynchronous tasks, 755

within tasks, 784786

Cooperative cancellation, definition, 769

CountdownEvent, 840

Custom asynchronous methods, 787791

D

DenyChildAttach enum, 758

DispatcherSynchronizationContext, 794

Disposable tasks, 774

E

Exception handling

parallel loop iterations, 803804

task-based asynchronous pattern, 779780

Exceptions

catching, 439

Exceptions, catching, 439

Exceptions, unhandled

handling with AggregateException, 762765

multithreading guidelines, 768

observing, 764765

on a thread, 765768

ExecuteSynchronously enum, 759

G

GetResponseAsync() method, 779

H

HideScheduler enum, 759

Hill climbing, 802803

I

IDisposable, 774

IsCancellationRequested property, monitoring, 770771

L

Lambda expressions, capturing loop variables, 531533

Lambdas, asynchronous, 786787

Latency, synchronous high-latency operations, 775777

LazyCancellation enum, 759

LongRunning enum, 758

Long-running tasks, 773774

Loop variables, capturing with lambda expressions, 531533

M

MaxDegreeOfParallelism property, 807

Multithreading, asynchronous tasks

AggregateException.Handle() method, 764

antecedent tasks, 757

asynchronous continuations, 756762

chaining tasks, 757

composing large tasks from smaller one, 756758

continuation tasks, 757

ContinueWith() method, 756758, 760761, 764765

control flow, 755

observing unhandled exceptions, 764765

registering for notification of task behavior, 760761

registering for unhandled exceptions, 766768

task continuation, 755762

TaskContinuationOptions enums, 758759

unhandled exception handling with AggregateException, 762765

unhandled exceptions on a thread, 765768

UnhandledException event, 766

Multithreading, canceling tasks

CancellationToken object, 769772

CancellationTokenSource.Cancel() method, 770771

cooperative cancellation, definition, 769

disposable tasks, 774

IDisposable, 774

IsCancellationRequested property, monitoring, 770771

long-running tasks, 773774

obtaining a task, 772773

TaskCreationOptions.LongRunning option, 773774

Task.Factory.StartNew() method, 772773

Task.Run() method, 772773

WaitHandle, 774

Multithreading, guidelines

long-running tasks, 773774

parallel loops, 801

unhandled exceptions, 768

Multithreading, parallel loop iterations

Break() method, 808

breaking, 808

canceling, 805806

exception handling with AggregateException, 803804

hill climbing, 802803

introduction, 798802

MaxDegreeOfParallelism property, 807

options, 806807

Parallel.For() loops, 807

Parallel.For() method, 808

Parallel.ForEach() loops, 807

Parallel.ForEach() method, 808

ParallelOptions parameter, 807

Stop() method, 808

TPL performance tuning, 802803

work stealing, 802803

Multithreading, PLINQ queries

canceling, 811813

introduction, 809811

Multithreading, task-based asynchronous pattern

AggregateException.Flatten() method, 780

AggregateException.Handle() method, 780

AspNetSynchronizationContext, 794

with async and await, 781786

async and await with the Windows UI, 795798

async keyword, purpose of, 786

asynchronous high-latency operations with the TPL, 777781

asynchronous lambdas, 786787

await keyword, 791792

await operators, 797798

awaiting non-Task<T> values, 791792

ContinueWith() method, 779

control flow misconceptions, 784

control flow within tasks, 784786

custom asynchronous methods, 787791

DispatcherSynchronizationContext, 794

GetResponseAsync() method, 779

handling exceptions, 779780

Process.Kill() method, 789

progress update, 789791

ReadToEndAsync() method, 779

RunProcessAsync() method, 788789

synchronization context, 793795

synchronous high-latency operations, 775777

task drawbacks, overview, 775

task schedulers, 793795

TaskCompletionSource.SetResult() method, 789

TaskCompletionSource<T> object, 788789

Unwrap() method, 779

WriteWebRequestSizeAsync() method, 780, 783

N

.NET versions, 29

NotOnCanceled enum, 759

NotOnFaulted enum, 758

NotOnRanToCompletion enum, 758

O

Obtaining a task, 772773

OnlyOnCanceled enum, 758

OnlyOnFaulted enum, 759

OnlyOnRanToCompletion enum, 759

P

Parallel loop iterations. See Multithreading, parallel loop iterations.

Parallel.For() loops, 807

Parallel.For() method, 808

Parallel.ForEach() loops, 807

Parallel.ForEach() method, 808

ParallelOptions parameter, 807

PreferFairness enum, 758

Process.Kill() method, 789

Progress update, 789791

R

ReadToEndAsync() method, 779

Registering for

notification of task behavior, 760761

unhandled exceptions, 766768

RunContinuationAsynchronously enum, 759

RunProcessAsync() method, 788789

S

SemaphoreSlim, 840

SemaphoreSlim.WaitAsync() method, 840

Stop() method, 808

Synchronization context, task-based asynchronous pattern, 793795

Synchronous high-latency operations, 775777

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Catch() method, 439

System.Threading.Timer, 846

System.Timers.Timer, 846

System.Windows.Forms.Timer, 846

System.Windows.Threading.DispatcherTimer, 846

T

TAP (Task-based Asynchronous Pattern), problems addressed by, 799

Task schedulers, 793795

Task-based asynchronous pattern. See Multithreading, task-based asynchronous pattern.

TaskCompletionSource.SetResult() method, 789

TaskCompletionSource<T> object, 788789

TaskContinuationOptions enums, 758759

TaskCreationOptions.LongRunning option, 773774

Task.Delay() method, 845846

Task.Factory.StartNew() method, 772773

Task.Run() method, 772773

Tasks

antecedent, 757

asynchronous. See Multithreading, asynchronous tasks.

canceling. See Multithreading, canceling tasks.

chaining, 757

composing large from smaller, 756758

continuation, 755762

control flow, 784786

disposable, 774

drawbacks, 775

long-running, 773774

obtaining, 772773

Task<T>, awaiting non-Task<T> values, 791792

Thread synchronization, synchronization types

CountdownEvent, 840

SemaphoreSlim, 840

SemaphoreSlim.WaitAsync() method, 840

Thread synchronization, Task return with no await operator, 820821

Thread synchronization, timers

System.Threading.Timer, 846

System.Timers.Timer, 846

System.Windows.Forms.Timer, 846

System.Windows.Threading.DispatcherTimer, 846

Task.Delay() method, 845846

Throwing exceptions

rethrowing, 439440

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() method, 439440

without replacing stack information, 439

Timers. See Thread synchronization, timers.

TPL (Task Parallel Library)

performance tuning, 802803

synchronous high-latency operations, 777781

U

Unhandled exceptions

handling with AggregateException, 762765

multithreading guidelines, 768

observing, 764765

registering for, 766768

on a thread, 765768

UnhandledException event, 766

Unwrap() method, 779

W

WaitHandle, 774

Work stealing, 802803

WriteWebRequestSizeAsync() method, 780, 783

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset