~ubuntu-branches/ubuntu/vivid/unrar-nonfree/vivid

« back to all changes in this revision

Viewing changes to threadpool.hpp

  • Committer: Package Import Robot
  • Author(s): Martin Meredith
  • Date: 2015-02-03 12:58:01 UTC
  • mfrom: (1.1.18) (5.1.18 sid)
  • Revision ID: package-import@ubuntu.com-20150203125801-od6ev8cqy1er51vz
Tags: 1:5.2.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#ifndef RAR_SMP
5
5
const uint MaxPoolThreads=1; // For single threaded version.
6
6
#else
 
7
#if defined(_ANDROID)
 
8
const uint MaxPoolThreads=16;
 
9
#else
7
10
const uint MaxPoolThreads=32;
 
11
#endif
8
12
 
9
13
 
10
14
#ifdef _UNIX
43
47
      void *Param;
44
48
    };
45
49
 
 
50
    void CreateThreads();
46
51
    static NATIVE_THREAD_TYPE PoolThread(void *Param);
47
52
        void PoolThreadLoop();
48
53
        bool GetQueuedTask(QueueEntry *Task);
51
56
    uint MaxAllowedThreads;
52
57
        THREAD_HANDLE ThreadHandles[MaxPoolThreads];
53
58
 
 
59
    // Number of actually created threads.
 
60
    uint ThreadsCreatedCount;
 
61
 
54
62
    uint ActiveThreads;
55
63
 
56
64
        QueueEntry TaskQueue[MaxPoolThreads];