comparison src/core/ngx_connection.c @ 5820:3377f9459e99

Events: removed broken thread support from posted events. It's mostly dead code. And the idea of thread support for this task has been deprecated.
author Valentin Bartenev <vbart@nginx.com>
date Mon, 01 Sep 2014 18:20:03 +0400
parents 4440438eb086
children 3f5f0ab59b35
comparison
equal deleted inserted replaced
5819:8e7ee4c70a3c 5820:3377f9459e99
949 * we have to clean the connection information before the closing 949 * we have to clean the connection information before the closing
950 * because another thread may reopen the same file descriptor 950 * because another thread may reopen the same file descriptor
951 * before we clean the connection 951 * before we clean the connection
952 */ 952 */
953 953
954 ngx_mutex_lock(ngx_posted_events_mutex); 954 ngx_unlock(&c->lock);
955
956 #endif
955 957
956 if (c->read->prev) { 958 if (c->read->prev) {
957 ngx_delete_posted_event(c->read); 959 ngx_delete_posted_event(c->read);
958 } 960 }
959 961
961 ngx_delete_posted_event(c->write); 963 ngx_delete_posted_event(c->write);
962 } 964 }
963 965
964 c->read->closed = 1; 966 c->read->closed = 1;
965 c->write->closed = 1; 967 c->write->closed = 1;
966
967 ngx_unlock(&c->lock);
968 c->read->locked = 0;
969 c->write->locked = 0;
970
971 ngx_mutex_unlock(ngx_posted_events_mutex);
972
973 #else
974
975 if (c->read->prev) {
976 ngx_delete_posted_event(c->read);
977 }
978
979 if (c->write->prev) {
980 ngx_delete_posted_event(c->write);
981 }
982
983 c->read->closed = 1;
984 c->write->closed = 1;
985
986 #endif
987 968
988 ngx_reusable_connection(c, 0); 969 ngx_reusable_connection(c, 0);
989 970
990 log_error = c->log_error; 971 log_error = c->log_error;
991 972