Valentin Bartenev a4aaf90679 Re-engineered timers.
To optimize rbtree operations, all changes are stored in array and later
processed in batches.

The previous implementation of this mechanics had a number of design flaws.
Each change was saved in a new array entry; until the changes were applied,
the timer remained in an intermediate state (NXT_TIMER_CHANGING).
This intermediate state didn't allow to identify if time was going to be
disabled or enabled.  However, the nxt_conn_io_read() function relied on
this information; as a result, in some cases the read timeout wasn't set.

Also, the nxt_timer_delete() function did not reliably track whether a timer
was added to the work queue.  It checked the NXT_TIMER_ENQUEUED state of
a timer, but this state could be reset to NXT_TIMER_DISABLED by a
nxt_timer_disable() call or another nxt_timer_delete() call.

Now, instead of keeping the whole history of the timer's changes, the new
implementation updates the timer state immediately, and only one operation
is added to the array to add or delete timer in the rbtree according
to its final state.
2018-10-22 16:01:10 +03:00
2018-10-18 13:38:30 +03:00
2018-10-22 16:01:10 +03:00
2018-09-20 18:18:52 +03:00
2017-09-06 18:26:37 +03:00
2018-01-01 16:31:07 +03:00

NGINX Unit
----------

The documentation and binary packages are available online:

  http://unit.nginx.org

The source code is provided under the terms of Apache License 2.0:

  http://hg.nginx.org/unit

Please ask questions, report issues, and send patches to the mailing list:

  unit@nginx.org (http://mailman.nginx.org/mailman/listinfo/unit)

or via Github:

  https://github.com/nginx/unit

--
NGINX, Inc.
http://nginx.com

Description
No description provided
Readme 12 MiB
Languages
Shell 63.7%
HTML 36.3%