// File: tiancihui[P]bo/./thread/threadPool.cpp
// Function: Thread::threadPool::__deleteIdleThread(int)
void  threadPool::__deleteIdleThread(int num)
	{
		_idleMutex.lock(__FUNCTION__,__LINE__);
		for(int i=0; i < num; i++)
		{
			if(_workIdleVec.size() > 0)
			{
				threadWork *removeThread = _workIdleVec.front();
				std::vector<threadWork *>::iterator pos;
				pos = std::find(_workIdleVec.begin(), _workIdleVec.end(), removeThread);
				if(pos != _workIdleVec.end())
				{
					_workIdleVec.erase(pos);
					_idleNum--;
				}

				std::vector<threadWork *>::iterator posTemp;
				posTemp = find(_workAllVec.begin(), _workAllVec.end(), removeThread);
				if(posTemp != _workAllVec.end())
				{
					_workAllVec.erase(posTemp);
					_allNum--;
				}

			}
		}
		_idleMutex.unlock(__FUNCTION__,__LINE__);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x90(%rbp)
addq $0x40, %rdi
leaq 0x1d4e(%rip), %rsi      # 0x50f6
movl $0x50, %edx
callq 0x2590
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x359d
movq -0x90(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x37f0
cmpq $0x0, %rax
jbe 0x358d
movq -0x90(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x3830
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x3860
movq -0x90(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x38d0
movq -0x90(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x108, %rdi            # imm = 0x108
callq 0x3900
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x3880
movq -0x90(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x108, %rdi            # imm = 0x108
callq 0x3900
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3930
testb $0x1, %al
jne 0x347a
jmp 0x34c2
movq -0x90(%rbp), %rax
addq $0x108, %rax            # imm = 0x108
movq %rax, -0x98(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x39e0
movq -0x98(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x3970
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, -0x50(%rbp)
movl 0x10(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x10(%rax)
leaq -0x58(%rbp), %rdi
callq 0x3860
movq -0x90(%rbp), %rdi
addq $0xd8, %rdi
callq 0x38d0
movq -0x90(%rbp), %rdi
movq %rax, -0x68(%rbp)
addq $0xd8, %rdi
callq 0x3900
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq -0x18(%rbp), %rdx
callq 0x3880
movq -0x90(%rbp), %rdi
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x58(%rbp)
addq $0xd8, %rdi
callq 0x3900
movq %rax, -0x78(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x3930
testb $0x1, %al
jne 0x3540
jmp 0x358b
movq -0x90(%rbp), %rax
addq $0xd8, %rax
movq %rax, -0xa0(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x39e0
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x3970
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, -0x88(%rbp)
movl 0xc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x358d
jmp 0x358f
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x33b9
movq -0x90(%rbp), %rdi
addq $0x40, %rdi
leaq 0x1b47(%rip), %rsi      # 0x50f6
movl $0x68, %edx
callq 0x25c0
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)