Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,8 @@
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\CachedCompletedInt32Task.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\ConfigureAwaitOptions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\Future.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\FutureFactory.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\Task_T.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\TaskFactory_T.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\LoggingExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\Sources\IValueTaskSource.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace System.Threading.Tasks
/// and may be used from multiple threads concurrently.
/// </para>
/// </remarks>
[DebuggerTypeProxy(typeof(SystemThreadingTasks_FutureDebugView<>))]
[DebuggerTypeProxy(typeof(SystemThreadingTasks_TaskDebugView<>))]
[DebuggerDisplay("Id = {Id}, Status = {Status}, Method = {DebuggerDisplayMethodDescription}, Result = {DebuggerDisplayResultDescription}")]
public class Task<TResult> : Task
{
Expand Down Expand Up @@ -1172,16 +1172,16 @@ internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResul
out TaskCreationOptions creationOptions,
out InternalTaskOptions internalOptions);

Task<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult, TNewResult>(
Task<TNewResult> continuationTask = new ContinuationResultTaskFromResultTask<TResult, TNewResult>(
this, continuationFunction, null,
creationOptions, internalOptions
);

// Register the continuation. If synchronous execution is requested, this may
// actually invoke the continuation before returning.
ContinueWithCore(continuationFuture, scheduler, cancellationToken, continuationOptions);
ContinueWithCore(continuationTask, scheduler, cancellationToken, continuationOptions);

return continuationFuture;
return continuationTask;
}
#endregion

Expand Down Expand Up @@ -1393,16 +1393,16 @@ internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?,
out TaskCreationOptions creationOptions,
out InternalTaskOptions internalOptions);

Task<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult, TNewResult>(
Task<TNewResult> continuationTask = new ContinuationResultTaskFromResultTask<TResult, TNewResult>(
this, continuationFunction, state,
creationOptions, internalOptions
);

// Register the continuation. If synchronous execution is requested, this may
// actually invoke the continuation before returning.
ContinueWithCore(continuationFuture, scheduler, cancellationToken, continuationOptions);
ContinueWithCore(continuationTask, scheduler, cancellationToken, continuationOptions);

return continuationFuture;
return continuationTask;
}

#endregion
Expand All @@ -1411,11 +1411,11 @@ internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?,
}

// Proxy class for better debugging experience
internal sealed class SystemThreadingTasks_FutureDebugView<TResult>
internal sealed class SystemThreadingTasks_TaskDebugView<TResult>
{
private readonly Task<TResult> m_task;

public SystemThreadingTasks_FutureDebugView(Task<TResult> task)
public SystemThreadingTasks_TaskDebugView(Task<TResult> task)
{
Debug.Assert(task != null);
m_task = task;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace System.Threading.Tasks.Tests
public sealed class TaskAPMTests : IDisposable
{
/// <summary>
/// Used to indicate whether to test TPL's Task or Future functionality for the APM pattern
/// Used to indicate whether to test TPL's Task or Task<TResult> functionality for the APM pattern
/// </summary>
private bool _hasReturnType;

Expand Down Expand Up @@ -234,7 +234,7 @@ public void EndDoTask(IAsyncResult asyncResult)
}

/// <summary>
/// A dummy class that simulates a long running Future that implements IAsyncResult methods
/// A dummy class that simulates a long running Task<TResult> that implements IAsyncResult methods
/// </summary>
public sealed class LongTask<T> : LongTask
{
Expand Down
Loading
Loading