# Class OsCmdQueue

java.lang.Object
org.snpeff.osCmd.OsCmdQueue

All Implemented Interfaces:
  `Iterable<OsCmdRunner>`

public class OsCmdQueue extends Object implements Iterable<OsCmdRunner>
A queue of commands to be run. They are run in multiple threads (default number of threads = number of CPUs in the computer)

Author:
  pcingola

## Field Summary

Fields
Modifier and Type
Field
Description
`static boolean`
`debug`

## Constructor Summary

Constructors
Constructor
Description
`OsCmdQueue()`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(OsCmdRunner cmd)`
Add command to be executed
`void`
`add(OsCmdRunner cmd, String outputFile)`
Add command to be executed, only if 'outputFile' does not exist
`Iterator<OsCmdRunner>`
`iterator()`
`void`
`kill()`
Kill all commands
`void`
`run()`
Run commands
`void`
`setNumThreads(int numThreads)`
`void`
`setRedirectToOutput(boolean redirectToOutput)`
`void`
`setVerbose(boolean verbose)`
`int`
`size()`
`String`
`toString()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface Iterable

`forEach, spliterator`

## Field Details

### debug

public static boolean debug

## Constructor Details

### OsCmdQueue

public OsCmdQueue()

## Method Details

### add

public void add(OsCmdRunner cmd)
Add command to be executed

Parameters:
  `cmd` -

### add

public void add(OsCmdRunner cmd, String outputFile)
Add command to be executed, only if 'outputFile' does not exist

Parameters:
  `cmd` -
  `outputFile` -

### iterator

public Iterator<OsCmdRunner> iterator()

Specified by:
  `iterator` in interface `Iterable<OsCmdRunner>`

### kill

public void kill()
Kill all commands

### run

public void run()
Run commands

### setNumThreads

public void setNumThreads(int numThreads)

### setRedirectToOutput

public void setRedirectToOutput(boolean redirectToOutput)

### setVerbose

public void setVerbose(boolean verbose)

### size

public int size()

### toString

public String toString()

Overrides:
  `toString` in class `Object`