A
VolatileCallSite
is a
CallSite
whose target acts like a volatile variable. An
invokedynamic
instruction linked to a
VolatileCallSite
sees updates to its call site target immediately, even if the update occurs in another thread. There may be a performance penalty for such tight coupling between threads.
Unlike MutableCallSite
, there is no syncAll operation on volatile call sites, since every write to a volatile variable is implicitly synchronized with reader threads.
In other respects, a VolatileCallSite
is interchangeable with MutableCallSite
.