SequenceRead
pthreads $ ConcurrentSequenceRead :: REAL
Type of the equivalent non thread-safe collectionpthreads $ ConcurrentSequenceRead :: SELF
Type of this instance, automatically specialized in every classpthreads $ ConcurrentSequenceRead :: index_of_from
The index of the first occurrence ofitem
, starting from pos.
pthreads $ ConcurrentSequenceRead :: iterator_from
Gets a new Iterator starting at positionpos
pthreads $ ConcurrentSequenceRead :: last_index_of
The index of the last occurrence ofitem
.
pthreads $ ConcurrentSequenceRead :: last_index_of_from
The index of the last occurrence ofitem
starting from pos
and decrementing.
pthreads $ ConcurrentSequenceRead :: reverse_iterator
Gets an iterator starting at the end and going backwardspthreads $ ConcurrentSequenceRead :: reverse_iterator_from
Gets an iterator on the chars of self starting frompos
core :: Collection :: CONCURRENT
Type of the concurrent variant of this collectionpthreads :: ConcurrentCollection :: REAL
Type of the equivalent non thread-safe collectioncore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Collection :: combinations
Allr
-length combinations on self (in same order) without repeated elements.
core :: Collection :: combinations_with_replacement
Allr
-length combination on self (in same order) with repeated elements.
core :: Object :: defaultinit
core :: SequenceRead :: defaultinit
core :: Collection :: defaultinit
core :: SequenceRead :: get_or_default
Try to get an element, returndefault
if the index
is invalid.
core :: SequenceRead :: get_or_null
Try to get an element, returnnull
if the index
is invalid.
core :: Collection :: has_all
Does the collection contain at least each element ofother
?
core :: Collection :: has_any
Does the collection contain at least one element ofother
?
core :: Collection :: has_exactly
Does the collection contain exactly all the elements ofother
?
core :: SequenceRead :: index_of_from
The index of the first occurrence ofitem
, starting from pos.
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: SequenceRead :: iterator_from
Gets a new Iterator starting at positionpos
core :: SequenceRead :: last_index_of
The index of the last occurrence ofitem
.
core :: SequenceRead :: last_index_of_from
The index of the last occurrence ofitem
starting from pos
and decrementing.
core :: SequenceRead :: modulo_index
Returns the real index for a modulo index.pthreads :: ConcurrentCollection :: mutex=
Mutex
used to synchronize access to self
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Collection :: permutations
Allr
-length permutations on self (all possible ordering) without repeated elements.
core :: Collection :: product
Cartesian product, overr
times self
.
pthreads :: ConcurrentCollection :: real_collection
Collection wrapped byself
pthreads :: ConcurrentCollection :: real_collection=
Collection wrapped byself
core :: SequenceRead :: reverse_iterator
Gets an iterator starting at the end and going backwardscore :: SequenceRead :: reverse_iterator_from
Gets an iterator on the chars of self starting frompos
core :: Collection :: to_concurrent
Wrapsself
in a thread-safe collection
core :: Collection :: to_counter
Create and fill up a counter with the elements of `self.core :: Collection :: to_curlslist
Convert Collection[String] to CURLSListcore :: Collection :: to_shuffle
Return a new array made of elements in a random order.pthreads :: ConcurrentCollection
A concurrent variant to the standardCollection
pthreads :: ConcurrentSequence
A concurrent variant to the standardSequence
ConcurrentList
Array
List
pthreads :: ReverseBlockingQueue
A collection whichis_empty
method blocks until it's empty
# A concurrent variant to the standard `SequenceRead`
abstract class ConcurrentSequenceRead[E]
super ConcurrentCollection[E]
super SequenceRead[E]
redef type REAL: SequenceRead[E]
redef fun ==(o)
do
mutex.lock
var r = real_collection == o
mutex.unlock
return r
end
redef fun [](index)
do
mutex.lock
var r = real_collection[index]
mutex.unlock
return r
end
redef fun hash
do
mutex.lock
var r = real_collection.hash
mutex.unlock
return r
end
redef fun index_of(index)
do
mutex.lock
var r = real_collection.index_of(index)
mutex.unlock
return r
end
redef fun index_of_from(index, from)
do
mutex.lock
var r = real_collection.index_of_from(index, from)
mutex.unlock
return r
end
redef fun iterator_from(index)
do
mutex.lock
var r = real_collection.iterator_from(index)
mutex.unlock
return r
end
redef fun last
do
mutex.lock
var r = real_collection.last
mutex.unlock
return r
end
redef fun last_index_of(e)
do
mutex.lock
var r = real_collection.last_index_of(e)
mutex.unlock
return r
end
redef fun last_index_of_from(e, from)
do
mutex.lock
var r = real_collection.last_index_of_from(e, from)
mutex.unlock
return r
end
redef fun reverse_iterator
do
mutex.lock
var r = real_collection.reverse_iterator
mutex.unlock
return r
end
redef fun reverse_iterator_from(from)
do
mutex.lock
var r = real_collection.reverse_iterator_from(from)
mutex.unlock
return r
end
end
lib/pthreads/concurrent_collections.nit:181,1--275,3