Following a tutorial on Disruptor in Java and they make the following call
Disruptor<LongEvent> disruptor = new Disruptor<>(LongEvent::new, bufferSize, executor);
Where LongEvent
is instantiated using a default constructor of no argument- ie. new LongEvent()
.
The equivalent line in Kotlin is throwing an error at the ::new
. What is the correct syntax for ::new
in Kotlin?
# THIS IS INVALID
val disruptor = Disruptor<LongEvent>(LongEvent::new, bufferSize, executor)