by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 14 22:15
    Arkatufus synchronize #4511
  • Jul 14 22:02
    Arkatufus edited #4511
  • Jul 14 22:02
    Arkatufus ready_for_review #4511
  • Jul 14 21:22
    Arkatufus synchronize #4511
  • Jul 14 20:49
    Arkatufus synchronize #4511
  • Jul 14 20:11
    Arkatufus synchronize #4511
  • Jul 14 18:09
    Arkatufus synchronize #4511
  • Jul 14 17:40
    IgorFedchenko commented #4515
  • Jul 14 17:35
    IgorFedchenko opened #4515
  • Jul 14 08:50
    storware-mchojnacki opened #4514
  • Jul 13 20:11
    Arkatufus commented #4511
  • Jul 13 20:10
    Arkatufus synchronize #4511
  • Jul 13 18:45
    Aaronontheweb milestoned #4505
  • Jul 13 18:45
    Aaronontheweb labeled #4505
  • Jul 13 18:45
    Aaronontheweb labeled #4505
  • Jul 13 18:45
    Aaronontheweb commented #4505
  • Jul 13 18:26
    Aaronontheweb synchronize #4510
  • Jul 13 18:24
    Aaronontheweb synchronize #4513
  • Jul 13 18:24

    Aaronontheweb on dev

    Use Props.Create<TActor>() inst… (compare)

  • Jul 13 18:24
    Aaronontheweb closed #4509
Marc Piechura
@marcpiechura
So you probably only need to fix it in one place ;)
I don't have time the next two days but I could look into it over the weekend if you haven't fixed it until then
Peter Hvidgaard
@hvidgaard
If I have an actor that must update the UI, must I create it in HOCON or can I use it programmatically without config?
Arjen Smits
@Danthar
You can pass the correct dispatcher programmatically
Peter Hvidgaard
@hvidgaard
@Danthar

If I use

Context.ActorOf(Context.DI().Props<UiWorkerActor>().WithDispatcher("akka.actor.synchronized-dispatcher"), "ui-worker");

I get the following error: "The current SynchronizationContext may not be used as a TaskScheduler."

Am I missing something?
I'm using 1.1.1.27
Bartosz Sypytkowski
@Horusiath
@hvidgaard you're probably using async somewhere in your UiWorkerActor
you cannot combine that with synchronized-dispatcher
Peter Hvidgaard
@hvidgaard
@Horusiath The error comes when the child actor is created.
Bartosz Sypytkowski
@Horusiath
I would guess, that one of the actor or its children is using something like async version of Receive
Peter Hvidgaard
@hvidgaard
It only calls Recieve<>(), no async code.
same for the parent.
the parent is created on the UI thread, is that a problem?
Bartosz Sypytkowski
@Horusiath
can you show the error stacktrace? - it doesn't come from akka
Peter Hvidgaard
@hvidgaard
This message was deleted
at Akka.Actor.LocalActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
at Akka.Actor.ActorCell.MakeChild(Props props, String name, Boolean async, Boolean systemService)
at Akka.Actor.ActorCell.ActorOf(Props props, String name, Boolean isAsync, Boolean isSystemService)
at Akka.Actor.ActorCell.ActorOf(Props props, String name)
at FF.Frontends.WPF.SearchModule.Actors.SearchActor..ctor(SearchResultViewModel searchResultViewModel) in C:\repo\FF3.0\Source\FF\Frontends\Wpf\Modules\FF.Wpf.SearchModule\Actors\SearchActor.cs:line 22
at lambda_method(Closure )
at SimpleInjector.InstanceProducer.BuildAndReplaceInstanceCreatorAndCreateFirstInstance()
at SimpleInjector.InstanceProducer.GetInstance()
inner exception
at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()
at Akka.Dispatch.CurrentSynchronizationContextExecutorServiceFactory.Produce(String id)
at Akka.Dispatch.Dispatcher.LazyExecutorServiceDelegate.<>c__DisplayClass3_0.<.ctor>b__0()
at Akka.Util.FastLazy`1.get_Value()
at Akka.Dispatch.Dispatcher.ExecuteTask(IRunnable run)
at Akka.Dispatch.CurrentSynchronizationContextDispatcherConfigurator.Dispatcher()
at Akka.Dispatch.Dispatchers.Lookup(String dispatcherName)
at Akka.Actor.LocalActorRefProvider.ActorOf(ActorSystemImpl system, Props props, IInternalActorRef supervisor, ActorPath path, Boolean systemService, Deploy deploy, Boolean lookupDeploy, Boolean async)
Bartosz Sypytkowski
@Horusiath
from what I see it looks like the child (the one which is going to use synchronized-dispatcher) is created from thread that doesn't have SynchronizationContext set (which is basically any background/non-ui thread)
you may need to check if synchronization context is set, and if not, set it manually if (SynchronizationContext.Current == null) SynchronizationContext.SetSynchronizationContext(context)
Peter Hvidgaard
@hvidgaard
But that requires that I have access to it? okay, I'll see what I can figure out without hard coupling everything together.
Bartosz Sypytkowski
@Horusiath
by default sychronization context is set only in UI thread, so you may want to capture it from there or use framework-specific one (i.e. Windows Forms does have it's own class for that)
Aaron Stannard
@Aaronontheweb
@Silv3rcircl3 yeah, the FlowInterleave specs implement a base class but the others do not
got 13 totally different random specs to fail this time
in Akka.Streams
so I think that it's something across the board with the DSL compiler
or at least something we're using to test it
dammit Mono
why you have to be so weird
Marc Piechura
@marcpiechura
I see, I really have no idea. @alexvaluyskiy mentioned that https://github.com/akkadotnet/akka.net/blob/ade2176dd5c1342d248c2a06bb72c81a8add18c8/src/core/Akka.Streams/Dsl/Keep.cs will not work on .netcore and since it contains some generic edge case stuff it's maybe worth a shot
Maybe the part that is missing on netcore is also not implemented on mono
Maciek Misztal
@mmisztal1980
@Aaronontheweb In a cluster: when a role-leader goes down and a new one gets elected, is there an event that signals it?
Aaron Stannard
@Aaronontheweb
yep
RoleLeaderChanged
can subscribe to it in the gossip
@Silv3rcircl3 looks like it's something being passed into Props
during actor system startup
Maciek Misztal
@mmisztal1980
does it contain role name information?
Aaron Stannard
@Aaronontheweb
Maciek Misztal
@mmisztal1980
awesome, cheers!
Aaron Stannard
@Aaronontheweb
@Silv3rcircl3 weird.... weird... weird
private LocalActorRef CreateSystemGuardian(LocalActorRef rootGuardian, string name, LocalActorRef userGuardian)     //Corresponds to Akka's: override lazy val guardian: systemGuardian
        {
            return CreateRootGuardianChild(rootGuardian, name, () =>
            {
                var props = Props.Create(() => new SystemGuardianActor(userGuardian), _systemGuardianStrategy);

                var systemGuardian = new LocalActorRef(_system, props, DefaultDispatcher, _defaultMailbox, rootGuardian, RootPath/name);
                return systemGuardian;
            });
        }
this is the culprit
according to the stack trace
Ronnie Overby
@ronnieoverby
I created and configured a custom priority mailbox and I see akka is instantiating it, but the PriorityGenerator method is never called
Aaron Stannard
@Aaronontheweb
but, this line of code is literally called in the setup of every AkkaSpec
Ronnie Overby
@ronnieoverby
Can someone help me with that?
Maciek Misztal
@mmisztal1980
btw, I'd like to do some mono builds with Akka, do you have any good material on how to get started with building stuff on mono? anything special I need to pay attention to ?