Skip to content

Conversation

fergusn
Copy link
Contributor

@fergusn fergusn commented Aug 12, 2015

The PR fixes #1225. The select loop is now only started once sockets are registered for selection, and stopped when no sockets are interested anymore.

case SocketAsyncOperation.Receive:
Execute(() =>
{
_read.Add(channel.Socket, channel);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks racy to me, _read is a dictionary and is now mutated on another thread.
Or?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All access to _read and _write are currently on a single thread - the one used for the select loop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

rogeralsing added a commit that referenced this pull request Aug 12, 2015
@rogeralsing rogeralsing merged commit 03c8536 into akkadotnet:dev Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

High CPU load using the Akka.IO TCP server
2 participants