-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Issue similar to #42 but when actor is asked.
Can be reproduced with:
using System.Reactive.Disposables;
var actor2 = spawn<BooleanDisposable, long>("actor2", () => new BooleanDisposable(), (state, msg) =>
{
using (observeUnsafe<Unit>(Self).Subscribe(_ => { }, () => { Console.WriteLine("subject completed in actor2"); }))
{
Console.WriteLine($"actor2: Processing msg: {msg}, state.IsDisposed={state.IsDisposed}");
Task.Delay(5 * seconds).Wait();
reply("Answer from actor2");
Console.WriteLine($"actor2: Answered and finished processing msg: {msg}, state.IsDisposed={state.IsDisposed}");
}
return state;
});
//ASK
Observable.Timer(1 * seconds).Subscribe(_ =>
{
Console.WriteLine($"Telling actor2 msg: {_}");
var answer = ask<string>(actor2, _);
Console.WriteLine($"Answer from actor2: {answer}");
});
Observable.Timer(2 * seconds).Subscribe(_ =>
{
Console.WriteLine("Killing actor2...");
kill(actor2);
Console.WriteLine("Killed actor2...");
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels