Is this thread bug?

hello,everyone:
I have to use nginx’s muti-thread model. Presently, i am using and
modifying it. But i have some problems about nginx’s thread processing:
(1) in funcion “ngx_worker_thread_cycle”, there is such codes which
i think is a mistake:
if (ngx_event_thread_process_posted(cycle) == NGX_ERROR) {
return (ngx_thread_value_t) 1;
}

    if (ngx_event_thread_process_posted(cycle) == NGX_ERROR) {
        return (ngx_thread_value_t) 1;
    }
    ==>why call twice?
(2)in function "ngx_event_expire_timers", lock problem as

followings:
ngx_mutex_lock(ngx_event_timer_mutex);

    root = ngx_event_timer_rbtree.root;

    if (root == sentinel) {
        return;
    }
    ==>return without call ngx_mutex_unlock?
(3) in function "ngx_epoll_process_events",lock problem too:
    before the code "call rev->handler(rev);" ,it has call

“ngx_mutex_lock(ngx_posted_events_mutex)”,but the handler recursively
call other functions wich may need the lock(“ngx_posted_events_mutex”)
too,then deadlock happens.
I just simply modify it as follows:
ngx_mutex_unlock(ngx_posted_events_mutex); //xxx
rev->handler(rev);
ngx_mutex_lock(ngx_posted_events_mutex); //xxx
===>whether this modifying will bring on other unconspicuous
problems?

Is there any solutions for nginx’s muti-threads using?Is there any

plan to support muti-threads?about when?
I am looking forward to your reply.
Thanks a lot.

Posted at Nginx Forum:

Hello!

On Wed, Feb 22, 2012 at 02:00:11AM -0500, feneyer wrote:

hello,everyone:
I have to use nginx’s muti-thread model. Presently, i am using and
modifying it. But i have some problems about nginx’s thread processing:

[…]

Threads support is obsolete, broken and should be removed. Just
ignore it.

Maxim D.

Hello, Maxim :
I do need to use nginx’s muti-thread model, is there any suggestion
for modifying?
Looking forward.

feneyer

Posted at Nginx Forum: