Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:53
    Aaronontheweb synchronize #3973
  • 15:52

    dependabot-preview[bot] on dev

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • 15:52

    dependabot-preview[bot] on nuget

    (compare)

  • 15:52
    dependabot-preview[bot] closed #3996
  • 15:52
    Aaronontheweb commented #3996
  • 14:53
    Aaronontheweb commented #3973
  • 12:20
    IgorFedchenko commented #3973
  • 12:17
    IgorFedchenko commented #3973
  • 11:58
    IgorFedchenko synchronize #3973
  • 11:33
    IgorFedchenko commented #3973
  • 11:25
    IgorFedchenko synchronize #3973
  • 07:04
    dependabot-preview[bot] labeled #3996
  • 07:04
    dependabot-preview[bot] opened #3996
  • 07:04

    dependabot-preview[bot] on nuget

    Bump Microsoft.NET.Test.Sdk fro… (compare)

  • 07:04
    dependabot-preview[bot] labeled #3995
  • 07:04

    dependabot-preview[bot] on nuget

    Bump BenchmarkDotNet from 0.10.… (compare)

  • 07:04
    dependabot-preview[bot] opened #3995
  • Oct 17 22:42
    Aaronontheweb commented #3944
  • Oct 17 22:41
    Aaronontheweb commented #3973
  • Oct 17 21:17
    IgorFedchenko commented #3973
Aaron Stannard
@Aaronontheweb
no problem
normally none of that stuff is an issue when you're working inside an actor
but yeah, when you want to re-use some of that state asynchronously
Stephen Riley
@stephen-riley
This really all started from "why do I need to explicitly specify a sender in Tell() while inside a continuation?" Been quite a lot of fun digging in.
Aaron Stannard
@Aaronontheweb
ah yeah
because our extension method that automatically supplies Self doesn't work outside the ActorCell
Context is basically the public API of the ActorCell
Stephen Riley
@stephen-riley
I know I could/should use PipeTo() for what I'm doing to be a little more "proper" about things, but you know how it is: once you start pulling a thread, you gotta see what unravels. :smile:
Aaron Stannard
@Aaronontheweb
I know how that feels
Stephen Riley
@stephen-riley
Ah, okay. I need to read up on ActorCell, clearly.
Aaron Stannard
@Aaronontheweb
ActorCell is what fits all of the different pieces of an actor together for user-defined actors
and most, but not all, built-in actors
connects the mailbox to the dispatcher to the actor implementation class
it's also what allows for safe restarting of actors too
there are some built-in actor types that operate without a cell, but they're special cases
router actors are one example
typically they're actors that don't need to obey the 1 message at a time guarantee
Stephen Riley
@stephen-riley
Ah, okay. So it's really the central "actor infrastructure state" thing per thread, and encapsulates the context on which my actor code is running?
Aaron Stannard
@Aaronontheweb
yep
the dispatching infrastructure in Akka.NET basically queues up groups of actors for processing
and can dispatch actors to work across an arbitrary number of threads
but one actor can only work on one thread at a time
if the actor still has unprocessed messages in its mailbox once it's finished
Stephen Riley
@stephen-riley
So, hypothetically, if I wanted to create a library of continuation extension methods (eg. something like ContinueActorWith()), it's all about managing the ActorCell for the continuation code to run on?
Aaron Stannard
@Aaronontheweb
it gets rescheduled back onto the dispatcher again for more processing
if you stick with what gets exposed via ActorContext
or whatever the Context interface is
that's all of the stable parts of the Cell API
and exposes everything you care about
most of what the ActorCell does internally is stuff like managing child actors
and handling deathwatch
etc
Stephen Riley
@stephen-riley
Ah, okay.
Aaron Stannard
@Aaronontheweb
there's some internal plumbing that might be interesting
albeit, it's unsafe
but it's public API
Stephen Riley
@stephen-riley
roger that.
this is the ThreadStatic variable I mentioned earlier
we have a more safe way of exposing that somewhere
I don't remember where it is off the type of my head
but if you're curious about the internals, the ActorCell stuff is really at the heart of the actors
Stephen Riley
@stephen-riley
No worries. I'll dig around.
Aaron Stannard
@Aaronontheweb
that and the dispatching / mailbox system
Stephen Riley
@stephen-riley
I'm a big fan of the Actor model, just wanted to see how it worked on .NET Core. This is pretty cool stuff.
Aaron Stannard
@Aaronontheweb
welp, there's always lots of people in here answering questions
enjoy your stay and let us know what we can do to help you :p
Stephen Riley
@stephen-riley
Thanks! And thanks for the help!
nathvi
@nathvi
Does gitter have a "load to my last message" button somewhere?
nathvi
@nathvi
Is there a recommended way to prioritize messages in an Actor's mailbox?