toggle menu
0.13.0-SNAPSHOT
0.13.0-SNAPSHOT
0.12.5
jvm
switch theme
search in API
modulecheck-utils:coroutines:impl
/
modulecheck.utils.coroutines.impl
/
LockFreeTaskQueueCore
Lock
Free
Task
Queue
Core
internal
class
LockFreeTaskQueueCore
<
E
:
Any
>
(
val
capacity
:
Int
,
val
singleConsumer
:
Boolean
)
(
source
)
Lock-free Multiply-Producer xxx-Consumer Queue core.
Since
0.12.0
See also
Lock
Free
Task
Queue
Members
Constructors
Lock
Free
Task
Queue
Core
Link copied to clipboard
constructor
(
capacity
:
Int
,
singleConsumer
:
Boolean
)
Types
Companion
Link copied to clipboard
internal
object
Companion
Placeholder
Link copied to clipboard
internal
class
Placeholder
(
val
index
:
Int
)
Properties
_next
Link copied to clipboard
private
val
_next
:
AtomicReference
<
Core
<
E
>
?
>
_state
Link copied to clipboard
private
val
_state
:
AtomicReference
<
Long
>
array
Link copied to clipboard
private
val
array
:
AtomicReferenceArray
<
Any
?
>
capacity
Link copied to clipboard
private
val
capacity
:
Int
is
Empty
Link copied to clipboard
val
isEmpty
:
Boolean
mask
Link copied to clipboard
private
val
mask
:
Int
single
Consumer
Link copied to clipboard
private
val
singleConsumer
:
Boolean
size
Link copied to clipboard
val
size
:
Int
Functions
add
Last
Link copied to clipboard
fun
addLast
(
element
:
E
)
:
Int
allocate
Next
Copy
Link copied to clipboard
private
fun
allocateNextCopy
(
state
:
Long
)
:
Core
<
E
>
allocate
Or
Get
Next
Copy
Link copied to clipboard
private
fun
allocateOrGetNextCopy
(
state
:
Long
)
:
Core
<
E
>
close
Link copied to clipboard
fun
close
(
)
:
Boolean
fill
Placeholder
Link copied to clipboard
private
fun
fillPlaceholder
(
index
:
Int
,
element
:
E
)
:
Core
<
E
>
?
is
Closed
Link copied to clipboard
fun
isClosed
(
)
:
Boolean
map
Link copied to clipboard
fun
<
R
>
map
(
transform
:
(
E
)
->
R
)
:
List
<
R
>
mark
Frozen
Link copied to clipboard
private
fun
markFrozen
(
)
:
Long
next
Link copied to clipboard
fun
next
(
)
:
LockFreeTaskQueueCore
<
E
>
remove
First
Or
Null
Link copied to clipboard
fun
removeFirstOrNull
(
)
:
Any
?
remove
Slow
Path
Link copied to clipboard
private
fun
removeSlowPath
(
oldHead
:
Int
,
newHead
:
Int
)
:
Core
<
E
>
?