Open
Description
Hi,
let deployRemotely address = Akka.Actor.Deploy(Akka.Actor.RemoteScope (Akka.Actor.Address.Parse address))
let spawnRemote systemOrContext remoteSystemAddress actorName expr otherOptionList =
Akka.FSharp.Spawn.spawne systemOrContext actorName expr ([Akka.FSharp.Spawn.SpawnOption.Deploy (deployRemotely remoteSystemAddress)] |> List.append otherOptionList)
let raddr = sprintf "akka.tcp://[email protected]:9000"
let actor9000 =
spawnRemote system raddr ("remoteTest" + System.Guid.NewGuid().ToString())
<@
fun (mailbox: Akka.FSharp.Actors.Actor<string>) ->
let rec a () = Akka.FSharp.Actors.actor {
let! _msg = mailbox.Receive()
printfn "%s..." _msg
if false then
return ""
else
return! a()
}
a()
@> [Akka.FSharp.Spawn.SpawnOption.SupervisorStrategy(Akka.FSharp.Strategy.OneForOne(fun error ->
match error with
| _ -> Akka.Actor.Directive.Resume
))]
spawne with a remote deployment would cause AmbiguousMatchException:
System.Reflection.AmbiguousMatchException: More than one matching method found!
at Hyperion.Extensions.TypeEx.GetMethodExt(MethodInfo& matchingMethod, Type type, String name, BindingFlags bindingFlags, Type[] parameterTypes)
at Hyperion.Extensions.TypeEx.GetMethodExt(Type thisType, String name, BindingFlags bindingFlags, Type[] parameterTypes)
(Because Cont<> has two union cases)
Could anyone provide a hint about how to get a workaround?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels