// File: JianjiaoSQ[P]MyPoorWebServer/././threadpool/threadpool.h
// Function: threadpool<http_conn>::run()
void threadpool<T>::run()
{
    while (true)
    {
        m_queuestat.wait();
        m_queuelocker.lock();
        if (m_workqueue.empty())
        {
            m_queuelocker.unlock();
            continue;
        }
        T *request = m_workqueue.front();
        m_workqueue.pop_front();
        m_queuelocker.unlock();
        if (!request)
            continue;
        if (1 == m_actor_model)
        {
            if (0 == request->m_state)
            {
                if (request->read_once())
                {
                    request->improv = 1;
                    connectionRAII mysqlcon(&request->mysql, m_connPool);
                    request->process();
                }
                else
                {
                    request->improv = 1;
                    request->timer_flag = 1;
                }
            }
            else
            {
                if (request->write())
                {
                    request->improv = 1;
                }
                else
                {
                    request->improv = 1;
                    request->timer_flag = 1;
                }
            }
        }
        else
        {
            connectionRAII mysqlcon(&request->mysql, m_connPool);
            request->process();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
addq $0x50, %rdi
callq 0xa600
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
callq 0x7010
movq -0x48(%rbp), %rdi
addq $0x10, %rdi
callq 0xd190
testb $0x1, %al
jne 0xd021
jmp 0xd030
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
callq 0x7190
jmp 0xcff4
movq -0x48(%rbp), %rdi
addq $0x10, %rdi
callq 0xd1b0
movq -0x48(%rbp), %rdi
movq (%rax), %rax
movq %rax, -0x10(%rbp)
addq $0x10, %rdi
callq 0xd1e0
movq -0x48(%rbp), %rdi
addq $0x28, %rdi
callq 0x7190
cmpq $0x0, -0x10(%rbp)
jne 0xd067
jmp 0xcff4
movq -0x48(%rbp), %rcx
movl $0x1, %eax
cmpl 0x78(%rcx), %eax
jne 0xd133
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl 0x10(%rcx), %eax
jne 0xd0fe
movq -0x10(%rbp), %rdi
callq 0x5240
testb $0x1, %al
jne 0xd093
jmp 0xd0e7
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
movl $0x1, 0x4(%rcx)
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq 0x70(%rax), %rdx
leaq -0x20(%rbp), %rdi
callq 0xa3f0
movq -0x10(%rbp), %rdi
callq 0x6ca0
jmp 0xd0c2
leaq -0x20(%rbp), %rdi
callq 0xa440
jmp 0xd0fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0xa440
jmp 0xd17e
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0xd131
movq -0x10(%rbp), %rdi
callq 0x6560
testb $0x1, %al
jne 0xd10d
jmp 0xd11a
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
jmp 0xd12f
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0xd131
jmp 0xd179
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq 0x70(%rax), %rdx
leaq -0x40(%rbp), %rdi
callq 0xa3f0
movq -0x10(%rbp), %rdi
callq 0x6ca0
jmp 0xd157
leaq -0x40(%rbp), %rdi
callq 0xa440
jmp 0xd179
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa440
jmp 0xd17e
jmp 0xcff4
movq -0x28(%rbp), %rdi
callq 0x3710
nopw (%rax,%rax)