Skip to content

Implement QuicMutex#5801

Merged
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
danzh2010:tarball
Feb 1, 2019
Merged

Implement QuicMutex#5801
mattklein123 merged 3 commits intoenvoyproxy:masterfrom
danzh2010:tarball

Conversation

@danzh2010
Copy link
Contributor

Add quic_mutex_impl.* and test.
Update envoy to refer to new tarball dc5ce1a82e342bfd366a1ccdf2a2717edb46e4ec.tar.gz which fix #include rules in quic_mutex.h.
Move some API's from external target quic_platform into quic_platform_base, so that those API's can be depended on by other impl target. Otherwise there would be a dependency circle when impl depends on other quic API's.

Risk Level: low, not in use
Part of #2557

Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Dan Zhang <danzh@google.com>
@danzh2010
Copy link
Contributor Author

/assign @mpwarres

mpwarres
mpwarres previously approved these changes Feb 1, 2019
Copy link
Contributor

@mpwarres mpwarres left a comment

Choose a reason for hiding this comment

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

LGTM, with one optional comment. Thanks!


cc_library(
name = "quic_platform",
srcs = ["quiche/quic/platform/api/quic_mutex.cc"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, splitting targets makes sense to deal with the impl -> api dependency. I wouldn't be surprised if we have to do this for a few more targets, which may require some shuffling in naming, but we can deal with that if/when we need to.


namespace quic {

void QuicLockImpl::WriterLock() { mu_.WriterLock(); }
Copy link
Contributor

Choose a reason for hiding this comment

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

Since all the method definitions are trivial, could they be inlined in the .h file, and then there's no need for the .cc file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

Signed-off-by: Dan Zhang <danzh@google.com>
Copy link
Contributor

@mpwarres mpwarres left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@danzh2010
Copy link
Contributor Author

/assign @mattklein123

@mattklein123 mattklein123 merged commit 5a88c95 into envoyproxy:master Feb 1, 2019
fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
Signed-off-by: Dan Zhang <danzh@google.com>
Signed-off-by: Fred Douglas <fredlas@google.com>
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.

4 participants