https://kotlinlang.org logo
Title
g

groostav

08/07/2018, 12:12 AM
Hey gents, does anybody have a good blog post or guide on using
kotlinx.coroutines.experimental.internal.LockFreeLinkedListHead
and friends? I'm using
AtomicReference
with immutable classes and its working, but at this point I'm now asking my
getAndUpdate
call to allocate a lot of new data in its `update`er method. some notes: - yes I know that class isnt formally part of the API, I will update as appropriate, and either copy-paste that code or keep everything at version zero. - my existing solution probably would be fine if
kotlinx.collections.immutable
was part of the stdlib, or I wanted to include it as an external dep, but its not, and I don't, and it seems to have lost all steam, much to my shigrin - no, I dont want to use
atomicfu
because I dont understand what atomicfu is asking me to do to my build system, ill poke around at gradle + byte code manipulation later.
e

elizarov

08/07/2018, 7:16 PM
Sorry. It is really internal for a reason that we don’t want to (nor have time to) make it public. Moreover, it is not the algorithm of the highest performance, but gets job done for us meanwhile (and outperforms some competition). In the future we hope to get it replaced with something more efficient (there is some research work in process).
👍 1
a

amrelmasry

08/09/2018, 9:47 AM
@groostav it's not exactly what you are searching for but this may be helpful:

https://www.youtube.com/watch?v=W2dOOBN1OQI

👍 1