org.allenai.common.ParIterator

ParIteratorEnrichment

Related Doc: package ParIterator

implicit final class ParIteratorEnrichment[T] extends AnyVal

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ParIteratorEnrichment
  2. AnyVal
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ParIteratorEnrichment(input: Iterator[T])

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  2. final def ##(): Int

    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]

    Definition Classes
    AnyVal → Any
  6. val input: Iterator[T]

  7. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  8. def parForeach(f: (T) ⇒ Unit, queueLimit: Int = defaultQueueLimit)(implicit ec: ExecutionContext): Unit

    Runs the given function over all values from the iterator in parallel, and returns when they are all done.

    Runs the given function over all values from the iterator in parallel, and returns when they are all done.

    The maximum parallelism that's supported by the execution context applies. Also, this function takes care not to overload the execution context with more requests than it can handle.

    If one or more of the function executions throw an exception, parForeach throws that same exception. It is undefined which exception gets thrown. The iterator is left in an undefined state in this case.

    f

    the function to execute

    ec

    the execution context to run the function executions in

  9. def parMap[O](f: (T) ⇒ O, queueLimit: Int = defaultQueueLimit)(implicit ec: ExecutionContext): Iterator[O]

    Maps an iterator to another iterator, performing the maps on the elements in parallel.

    Maps an iterator to another iterator, performing the maps on the elements in parallel. Returns an iterator with the values mapped by the given function.

    The maximum parallelism that's supported by the execution context applies. Also, this function makes sure to not overwhelm the JVM's resources with too many temporary results. To do this, the returned iterator will "work ahead" of the thread that's reading from it, but there is a limit to how far ahead it will work.

    If one or more of the map function executions throw an exception, only the first exception is reported, and it is reported when you call next() on the returned iterator.

    O

    the type of the output

    f

    the function performing the mapping

    ec

    the execution context to run the function executions in

    returns

    a new iterator with the mapped values from the old iterator

  10. def toString(): String

    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped