Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Make AddFutureAwaitResult an AnyVal #647

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

private[this] var eventStreamLogger: ActorRef = _
private[http] def installEventStreamLoggerFor(channel: Class[_])(implicit system: ActorSystem): Unit = {
synchronized {

Check warning on line 61 in http-core/src/main/scala/org/apache/pekko/http/impl/util/package.scala

View workflow job for this annotation

GitHub Actions / Compile and test (3.3, 8)

Suspicious top-level unqualified call to synchronized

Check warning on line 61 in http-core/src/main/scala/org/apache/pekko/http/impl/util/package.scala

View workflow job for this annotation

GitHub Actions / Compile and test (3.3, 11)

Suspicious top-level unqualified call to synchronized
if (eventStreamLogger == null)
eventStreamLogger =
system.actorOf(Props[util.EventStreamLogger]().withDeploy(Deploy.local), name = "event-stream-logger")
Expand All @@ -68,7 +68,7 @@
private[http] def installEventStreamLoggerFor[T](implicit ct: ClassTag[T], system: ActorSystem): Unit =
installEventStreamLoggerFor(ct.runtimeClass)

private[http] implicit class AddFutureAwaitResult[T](future: Future[T]) {
private[http] implicit class AddFutureAwaitResult[T](val future: Future[T]) extends AnyVal {

/** "Safe" Await.result that doesn't throw away half of the stacktrace */
def awaitResult(atMost: Duration): T = {
Expand Down
Loading