Skip to content

Forbid writes from reader thread.#2905

Merged
JakeWharton merged 1 commit intomasterfrom
jw/forbid-writes-on-reader
Oct 12, 2016
Merged

Forbid writes from reader thread.#2905
JakeWharton merged 1 commit intomasterfrom
jw/forbid-writes-on-reader

Conversation

@JakeWharton
Copy link
Copy Markdown
Collaborator

Refs #2902.

private final String name;

/** The thread looping the reader. Will become null when looping stops for any reason. */
private volatile Thread looperThread;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is so named because fields prefixed with 'reader' are documented as only being accessible on the reader thread.

@JakeWharton JakeWharton force-pushed the jw/forbid-writes-on-reader branch from 0cc7566 to 8ab575e Compare October 12, 2016 04:01

/** Send an unsolicited pong with the specified payload. */
final void sendPong(ByteString payload) throws IOException {
public final void pong(ByteString payload) throws IOException {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Note: not actually a public API since this is internal

Copy link
Copy Markdown
Collaborator

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

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

Awesome.

@JakeWharton JakeWharton merged commit 019e943 into master Oct 12, 2016
@JakeWharton JakeWharton deleted the jw/forbid-writes-on-reader branch October 12, 2016 04:10
@swankjesse swankjesse mentioned this pull request Oct 12, 2016
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.

2 participants