Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 13:04
    atrauzzi edited #4229
  • 12:57
    atrauzzi commented #4229
  • 12:07
    imkow commented #4017
  • 06:43
    dependabot-preview[bot] labeled #4230
  • 06:43

    dependabot-preview[bot] on nuget

    Bump FsPickler from 5.3.1 to 5.… (compare)

  • 06:43
    dependabot-preview[bot] opened #4230
  • 05:38
    Aaronontheweb commented #4229
  • 05:38
    Aaronontheweb commented #4229
  • 03:29
    atrauzzi opened #4229
  • Feb 17 21:57
    Arkatufus edited #4228
  • Feb 17 21:46
    Arkatufus synchronize #4228
  • Feb 17 20:17
    Arkatufus synchronize #4228
  • Feb 17 19:55
    Arkatufus opened #4228
  • Feb 17 19:14
    Arkatufus synchronize #4226
  • Feb 17 18:28
    Aaronontheweb commented #4226
  • Feb 17 18:27
    Aaronontheweb commented #4226
  • Feb 17 18:23
    Aaronontheweb synchronize #4226
  • Feb 17 18:23

    Aaronontheweb on nuget

    (compare)

  • Feb 17 18:23

    Aaronontheweb on dev

    Bump Google.Protobuf from 3.11.… (compare)

  • Feb 17 18:23
    Aaronontheweb closed #4225
Aaron Stannard
@Aaronontheweb
if messages are making it through then, means that either your actor isn't using this mailbox
Ronnie Overby
@ronnieoverby
you see my props creation, though
Aaron Stannard
@Aaronontheweb
yep
Ronnie Overby
@ronnieoverby
and I see a debugger breaking in the mailbox ctor
want a stack trace at that point?
idk if it will help or not
Aaron Stannard
@Aaronontheweb
nah, I believe you on that
do me a favor
throw an exception in the PriorityGenerator
Ronnie Overby
@ronnieoverby
?
ok
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