SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions | Variables
ThreadPool.h File Reference
`#include "memoryoverride.h"`
`#include "DS_Queue.h"`
`#include "SimpleMutex.h"`
`#include "Export.h"`
`#include "thread.h"`
`#include "SignaledEvent.h"`
`#include "ThreadPool.h"`
`#include "sleep.h"`
`#include <unistd.h>`

Go to the source code of this file.

## Classes

class | ThreadDataInterface
struct | ThreadPool< InputType, OutputType >

## Functions

| if (threadPool->perThreadDataFactory) perThreadData =threadPool->threadDataInterface->PerThreadFactory(threadPool->tdiContext)
threadPool numThreadsRunningMutex | Lock ()
threadPool numThreadsRunningMutex | Unlock ()
| for (;;)

## Variables

template<class ThreadInputType , class ThreadOutputType >
ThreadPool< ThreadInputType, ThreadOutputType > * | threadPool = (ThreadPool<ThreadInputType, ThreadOutputType>*) arguments
bool | returnOutput
ThreadOutputType(* | userCallback )(ThreadInputType, bool *, void *) =0
ThreadInputType | inputData
ThreadOutputType | callbackOutput
void * | perThreadData =0
threadPool | numThreadsRunning
| return

## Function Documentation

for | ( | ;; |  | ) |

Definition at line 240 of file ThreadPool.h.

References _FILE_AND_LINE_, ThreadPool< InputType, OutputType >::inputFunctionQueue, ThreadPool< InputType, OutputType >::inputQueue, ThreadPool< InputType, OutputType >::inputQueueMutex, SLNet::SimpleMutex::Lock(), ThreadPool< InputType, OutputType >::numThreadsWorking, ThreadPool< InputType, OutputType >::outputQueue, ThreadPool< InputType, OutputType >::outputQueueMutex, ThreadPool< InputType, OutputType >::quitAndIncomingDataEvents, ThreadPool< InputType, OutputType >::runThreads, ThreadPool< InputType, OutputType >::runThreadsMutex, SLNet::SimpleMutex::Unlock(), userCallback, SLNet::SignaledEvent::WaitOnEvent(), and ThreadPool< InputType, OutputType >::workingThreadCountMutex.

Referenced by DataStructures::BPlusTree< KeyType, DataType, order >::InsertIntoNode().

else if | ( | threadPool-> | perThreadDataFactory | ) | =threadPool->threadDataInterface->PerThreadFactory(threadPool->tdiContext)

Referenced by SLNet::HuffmanEncodingTree::DecodeArray(), DataStructures::BPlusTree< KeyType, DataType, order >::DeleteFromPageAtIndex(), SLNet::ReliabilityLayer::HandleSocketReceiveFromConnectedPlayer(), DataStructures::BPlusTree< KeyType, DataType, order >::InsertIntoNode(), and DataStructures::BPlusTree< KeyType, DataType, order >::ShiftNodeLeft().

threadPool numThreadsRunningMutex Lock | ( |  | ) |

threadPool numThreadsRunningMutex Unlock | ( |  | ) |

## Variable Documentation

ThreadOutputType callbackOutput

Definition at line 223 of file ThreadPool.h.

ThreadInputType inputData

Definition at line 222 of file ThreadPool.h.

Referenced by DataStructures::Tree< TreeType >::Tree().

threadPool numThreadsRunning

Definition at line 237 of file ThreadPool.h.

Referenced by ThreadPool< InputType, OutputType >::StartThreads(), ThreadPool< InputType, OutputType >::StopThreads(), and ThreadPool< InputType, OutputType >::ThreadPool().

else perThreadData =0

Definition at line 227 of file ThreadPool.h.

return

Definition at line 303 of file ThreadPool.h.

Referenced by SLNet::RakPeer::AddToBanList(), DataStructures::CircularLinkedList< CircularLinkedListType >::CircularLinkedList(), DataStructures::Queue< queue_type >::Clear(), DataStructures::CircularLinkedList< CircularLinkedListType >::Clear(), DataStructures::List< list_type >::Compress(), DataStructures::CircularLinkedList< CircularLinkedListType >::Concatenate(), SLNet::HuffmanEncodingTree::DecodeArray(), DataStructures::CircularLinkedList< CircularLinkedListType >::Del(), DataStructures::BinarySearchTree< BinarySearchTreeType >::DisplayBreadthFirstSearch(), DataStructures::BinarySearchTree< BinarySearchTreeType >::DisplayInorder(), DataStructures::BinarySearchTree< BinarySearchTreeType >::DisplayPostorder(), DataStructures::BinarySearchTree< BinarySearchTreeType >::DisplayPreorder(), SLNet::StringCompressor::EncodeString(), SLNet::HuffmanEncodingTree::FreeMemory(), SLNet::StringCompressor::GenerateTreeFromStrings(), GetMyIP_Win32(), DataStructures::LinkedList< LinkedListType >::LinkedList(), SLNet::RakPeer::PingInternal(), DataStructures::Queue< queue_type >::Push(), DataStructures::Queue< queue_type >::RemoveAtIndex(), SLNet::RakPeer::RemoveFromBanList(), DataStructures::CircularLinkedList< CircularLinkedListType >::Sort(), and SLNet::StatisticsToString().

bool returnOutput

Definition at line 220 of file ThreadPool.h.

template<class ThreadInputType , class ThreadOutputType >

ThreadPool<ThreadInputType, ThreadOutputType>* threadPool = (ThreadPool<ThreadInputType, ThreadOutputType>*) arguments

Definition at line 217 of file ThreadPool.h.

userCallback =0

Definition at line 221 of file ThreadPool.h.

Referenced by for().