Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
165 views
in Technique[技术] by (71.8m points)

c# - Why variables are not marked as volatile in akka.net

I'm learning akka.net. And I don't understand why i is not marked as volatile.

Can anyone explain please?

    public class TestActor : UntypedActor
        {
            private int i;
            protected override void OnReceive(object message)
            {
                i++;
            }
        }

Akka.NET ensures that the implementation details don't affect the single-threadedness of handling the actor's state.

question from:https://stackoverflow.com/questions/65843087/why-variables-are-not-marked-as-volatile-in-akka-net

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...