7.1.3.1. cli Package

7.1.3.1.1. commands Module

7.1.3.1.2. display Module

7.1.3.1.3. repo_cli Module

7.1.3.1.4. thread_pool Module

Simple size constrained thread pool that blocks when all threads are busy

exception pulpdist.cli.thread_pool.PendingTasks[source]

Bases: exceptions.Exception

Exception thrown if ThreadPool.wait_for_tasks() times out

class pulpdist.cli.thread_pool.Task(priority, func, args, kwds)

Bases: tuple

args

Alias for field number 2

func

Alias for field number 1

kwds

Alias for field number 3

priority

Alias for field number 0

class pulpdist.cli.thread_pool.ThreadPool(num_threads, name='ThreadPool')[source]

Pool of threads consuming tasks from a queue

add_task(priority, func, *args, **kwds)[source]

Add a task to the queue. Blocks if all threads are busy.

wait_for_tasks(timeout=None)[source]

Wait for completion of all the tasks in the queue

class pulpdist.cli.thread_pool.Worker(tasks, name=None)[source]

Bases: threading.Thread

Thread executing tasks from a given tasks queue

run()[source]