Skip to content

Commit

Permalink
removed all instances of TaskContinuationOptions.AttachedToParent per a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb committed Dec 8, 2015
1 parent 307d730 commit 19d01ae
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/core/Akka.FSharp/FsApi.fs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module Actors =
/// tracked by actorRef and awaits for response send back from corresponding actor.
/// </summary>
let (<?) (tell : #ICanTell) (msg : obj) : Async<'Message> =
tell.Ask(msg).ContinueWith(Func<_,'Message>(tryCast), TaskContinuationOptions.AttachedToParent|||TaskContinuationOptions.ExecuteSynchronously)
tell.Ask(msg).ContinueWith(Func<_,'Message>(tryCast), TaskContinuationOptions.ExecuteSynchronously)
|> Async.AwaitTask

/// Pipes an output of asynchronous expression directly to the recipients mailbox.
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka.Persistence/Journal/AsyncWriteJournal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Akka.Persistence.Journal
{
public abstract class AsyncWriteJournal : WriteJournalBase, IAsyncRecovery
{
private static readonly TaskContinuationOptions _continuationOptions = TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.AttachedToParent;
private static readonly TaskContinuationOptions _continuationOptions = TaskContinuationOptions.ExecuteSynchronously;
protected readonly bool CanPublish;
private readonly PersistenceExtension _extension;
private readonly IActorRef _resequencer;
Expand Down
3 changes: 2 additions & 1 deletion src/core/Akka.Remote/Transport/AkkaProtocolTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -891,8 +891,9 @@ private State<AssociationState, ProtocolStateData> HandleTimers(AssociationHandl

private void ListenForListenerRegistration(TaskCompletionSource<IHandleEventListener> readHandlerSource)
{
var self = Self;
readHandlerSource.Task.ContinueWith(rh => new HandleListenerRegistered(rh.Result),
TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.AttachedToParent).PipeTo(Self);
TaskContinuationOptions.ExecuteSynchronously).PipeTo(self);
}

private Task<IHandleEventListener> NotifyOutboundHandler(AssociationHandle wrappedHandle,
Expand Down
8 changes: 3 additions & 5 deletions src/core/Akka.Remote/Transport/ThrottleTransportAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,14 @@ public override Task<bool> ManagementCommand(object message)
{
return r.Result is SetThrottleAck;
},
TaskContinuationOptions.AttachedToParent |
TaskContinuationOptions.ExecuteSynchronously |
TaskContinuationOptions.ExecuteSynchronously &
TaskContinuationOptions.OnlyOnRanToCompletion);
}

if (message is ForceDisassociate || message is ForceDisassociateExplicitly)
{
return manager.Ask(message, AskTimeout).ContinueWith(r => r.Result is ForceDisassociateAck,
TaskContinuationOptions.AttachedToParent |
TaskContinuationOptions.ExecuteSynchronously |
TaskContinuationOptions.ExecuteSynchronously &
TaskContinuationOptions.OnlyOnRanToCompletion);
}

Expand Down Expand Up @@ -437,7 +435,7 @@ private Task<SetThrottleAck> AskModeWithDeathCompletion(IActorRef target, Thrott
// internalTarget.Tell(new Unwatch(target, promiseRef));
// return SetThrottleAck.Instance;
// }
//}, TaskContinuationOptions.AttachedToParent & TaskContinuationOptions.ExecuteSynchronously);
//}, TaskContinuationOptions.ExecuteSynchronously);

}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/Akka/Actor/Futures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal static IActorRefProvider ResolveProvider(ICanTell self)
private static Task<object> Ask(ICanTell self, object message, IActorRefProvider provider,
TimeSpan? timeout)
{
var result = new TaskCompletionSource<object>(TaskContinuationOptions.AttachedToParent);
var result = new TaskCompletionSource<object>();

timeout = timeout ?? provider.Settings.AskTimeout;

Expand Down

0 comments on commit 19d01ae

Please sign in to comment.