Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 21 15:57
    Aaronontheweb closed #3877
  • Oct 21 15:57
    Aaronontheweb commented #3877
  • Oct 21 15:56

    Aaronontheweb on dev

    Persistence TestKit documentati… (compare)

  • Oct 21 15:56
    Aaronontheweb closed #3889
  • Oct 21 07:27
    dependabot-preview[bot] labeled #3999
  • Oct 21 07:27

    dependabot-preview[bot] on nuget

    Bump FluentAssertions from 4.14… (compare)

  • Oct 21 07:27
    dependabot-preview[bot] opened #3999
  • Oct 20 17:25
    valdisz synchronize #3889
  • Oct 20 17:17
    valdisz synchronize #3889
  • Oct 20 15:44
    valdisz synchronize #3889
  • Oct 20 09:22
    ismaelhamed commented #3863
  • Oct 19 23:39
    valdisz synchronize #3889
  • Oct 19 23:08
    edvinasz commented #2947
  • Oct 19 13:36
    Aaronontheweb commented #3973
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3995
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] edited #3995
  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3993
  • Oct 19 13:34

    dependabot-preview[bot] on nuget

    Bump Google.Protobuf from 3.9.1… (compare)

  • Oct 19 13:34
    dependabot-preview[bot] synchronize #3991
Aaron Stannard
@Aaronontheweb
we call this a "tracer round"
lol
Ronnie Overby
@ronnieoverby
i like it
nothing happened
    protected override int PriorityGenerator(object message)
    {
        throw new ApplicationException("BLARGH!");

        if (message is Unsubscribe || message is Subscribe)
            return 0;

        return 1;
    }
Aaron Stannard
@Aaronontheweb
alrighty then
and the actor still received its message?
Ronnie Overby
@ronnieoverby
yes
Aaron Stannard
@Aaronontheweb
you know... I wonder....
this would be extremely weird
public abstract class UnboundedPriorityMailbox : MailboxType, IProducesMessageQueue<UnboundedPriorityMessageQueue>
    {
        protected abstract int PriorityGenerator(object message);

        public int InitialCapacity { get; }

        public const int DefaultCapacity = 11;

        public sealed override IMessageQueue Create(IActorRef owner, ActorSystem system)
        {
            return new UnboundedPriorityMessageQueue(PriorityGenerator, InitialCapacity);
        }

        protected UnboundedPriorityMailbox(Settings settings, Config config) : base(settings, config)
        {
            InitialCapacity = DefaultCapacity;
        }
    }
this is the unbounded priority mailbox in its full glory
Ronnie Overby
@ronnieoverby
pretty simple
Aaron Stannard
@Aaronontheweb
it's just a type provider
it takes your priority function and passes it into that queue
I wonder, if by some race condition
during the construction of this object
if it's possible
public class UnboundedPriorityMessageQueue : BlockingMessageQueue
    {
        private readonly ListPriorityQueue _prioQueue;

        public UnboundedPriorityMessageQueue(int initialCapacity)
        {
            _prioQueue = new ListPriorityQueue(initialCapacity);
        }

        public UnboundedPriorityMessageQueue(Func<object, int> priorityGenerator, int initialCapacity) : this(initialCapacity)
        {
            _prioQueue.SetPriorityCalculator(priorityGenerator);
        }

        internal void SetPriorityGenerator(Func<object, int> priorityGenerator)
        {
            _prioQueue.SetPriorityCalculator(priorityGenerator);
        }
that this queue never ends up getting to call the SetPriorityCalculator
would you mind reporting a bug for this?
I have an idea on how to test it
Ronnie Overby
@ronnieoverby
sure thing... just the bug? you need any code/tests or anything?
Aaron Stannard
@Aaronontheweb
just the bug and a test
Ronnie Overby
@ronnieoverby
ok
Aaron Stannard
@Aaronontheweb
thanks @ronnieoverby
Ronnie Overby
@ronnieoverby
thanks for the help
Aaron Stannard
@Aaronontheweb
np, it would be super weird if this were the case
since these are all synchronous functions
looks like this is a good candidate for a model-based test
Ronnie Overby
@ronnieoverby
?
Aaron Stannard
@Aaronontheweb
in fact, I should probably just make the priority calculator immutable
I have no idea why it isn't
I still need to publish post 3 in that series
Ronnie Overby
@ronnieoverby
will read :+1:
Aaron Stannard
@Aaronontheweb
@Silv3rcircl3 so yeah, this is a stumper.... the LocalActorRefProvider throwing when creating the system guardian, but only inside Akka.Streams.Tests and only randomly on some of them?
well, always one sure fire way to fix this
not use the expression compiler that way, period
Aaron Stannard
@Aaronontheweb
ok, inlined that part of the guardian startup process
i don't know why that failed on only the Akka.Streams.Tests
let's see if this works
Aaron Stannard
@Aaronontheweb
yep, that did the trick
although the Thread.Interrupt call we make on one of the specs caused the XUnit test runner to blow up
which is actually kind of entertaining TBH
but otherwise the Akka.Streams.Tests are passing now
Marc Piechura
@marcpiechura
@Aaronontheweb great! Replacement for the Interrupt call is already in the netcore branch see alexvaluyskiy/akka.net@3c6861a if you want to pick it
Peter Hvidgaard
@hvidgaard
Is there any way to create an Actor from a background thread, which can use the "akka.actor.synchronized-dispatcher" dispatcher without capturing the context from a UI thread and injecting it?
it just seems to backwards.
Marin
@mrn-aglic

I am not sure if this is a bug or not, or if this should be posted here or not, but here it goes...

I am using Akka.NET remoting, I have one "client" and one "server" application (I know akka doesn't distinguish between them) and I wanted to receive some entity (called History) from the server.

The class I was sending from the server has an IReadOnlyCollection of one of my custom entities (conveniently called Entity).
Now the Entity class had 2 constructors, first of which took a string and parsed it into a DateTime object, and the second which took a DateTime object.

However, when I tried to send this History from the server to the client I would get a disassociated exception.
Looking into it, I first commented out the construct that takes the DateTime object. However, when the other constructor was invoked, the string paramater (which I would like to parse to a DateTime) was equal to null.

Commenting out the constructor that takes a string and tries to parse it into a DateTime, I was left with only the second constructor which takes a DateTime object. This worked.

But I don't know why exactly it didn't work when I had both constructors, or why the string parameter was equal to null.

I can send or link the file with all of the classes if it could help.

Sorry if I am/was unclear.