Back to index

python3.2  3.2.2
Classes | Public Member Functions | Public Attributes
test.test_dummy_threading.DummyThreadingTestCase Class Reference

List of all members.

Classes

class  TestThread

Public Member Functions

def setUp
def test_tasks

Public Attributes

 numtasks
 threads

Detailed Description

Definition at line 6 of file test_dummy_threading.py.


Member Function Documentation

Definition at line 36 of file test_dummy_threading.py.

00036 
00037     def setUp(self):
00038         self.numtasks = 10
00039         global sema
00040         sema = _threading.BoundedSemaphore(value=3)
00041         global mutex
00042         mutex = _threading.RLock()
00043         global running
00044         running = 0
00045         self.threads = []

Here is the caller graph for this function:

Definition at line 46 of file test_dummy_threading.py.

00046 
00047     def test_tasks(self):
00048         for i in range(self.numtasks):
00049             t = self.TestThread(name="<thread %d>"%i)
00050             self.threads.append(t)
00051             t.start()
00052 
00053         if support.verbose:
00054             print('waiting for all tasks to complete')
00055         for t in self.threads:
00056             t.join()
00057         if support.verbose:
00058             print('all tasks done')


Member Data Documentation

Definition at line 37 of file test_dummy_threading.py.

Definition at line 44 of file test_dummy_threading.py.


The documentation for this class was generated from the following file: