Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson committed Sep 20, 2024
1 parent 18ec909 commit 190382c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import com.typesafe.config.Config

final case class Envelope private (message: Any, sender: ActorRef) {

@noinline
@noinline // not inlined to permit downstream bytecode instrumentation to attach context information to the Envelope
def copy(message: Any = message, sender: ActorRef = sender) = {
Envelope(message, sender)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ final case class ThreadPoolConfig(
queueFactory: ThreadPoolConfig.QueueFactory = ThreadPoolConfig.linkedBlockingQueue(),
rejectionPolicy: RejectedExecutionHandler = ThreadPoolConfig.defaultRejectionPolicy)
extends ExecutorServiceFactoryProvider {
// Written explicitly to permit non-inlined defn; this is necessary for downstream instrumentation that stores extra
// context information on the config
@noinline
def copy(
allowCorePoolTimeout: Boolean = allowCorePoolTimeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ final class MessageBuffer private (private var _head: MessageBuffer.Node, privat

object MessageBuffer {
private final class Node(var next: Node, val message: Any, val ref: ActorRef) {
@noinline
@noinline // not inlined to permit downstream bytecode instrumentation to apply context information on the Node to the message
def apply(f: (Any, ActorRef) => Unit): Unit = {
f(message, ref)
}
Expand Down

0 comments on commit 190382c

Please sign in to comment.