Hello!
On Sat, Sep 17, 2016 at 08:25:54AM +0800, 洪志道 wrote:
[...]
> static void
> ngx_http_log_flush(ngx_open_file_t *file, ngx_log_t *log)
> {
> ...
> if (buffer->event && buffer->event->timer_set) {
> ngx_del_timer(buffer->event);
> }
> }
>
>
> I find there are two
Well, I get it.
By the way, If I want to add a timer, it can do something like crontab in
worker process.
For example, we collect data in worker process and dump the data every 5
minutes.
event->cancelable = 1;
In event handler, the codes like the following:
static void
Hey Maxim,
> The "*(lock) == 0" check here is just an optimization, it only
> ensures that the lock is likely to succed.
Yes, and use of the ngx_atomic_load() doesn't affect that.
Namely, in the micro-benchmarks I did (heavy contention - 100 threads
trying to acquire lock, update value, release
Hello!
On Fri, Sep 16, 2016 at 02:44:38PM +0100, Alessandro Ghedini wrote:
> # HG changeset patch
> # User Alessandro Ghedini
> # Date 1474033303 -3600
> # Fri Sep 16 14:41:43 2016 +0100
> # Node ID 64afed0e819b9af65e7afa89baad3313f1db18d4
> # Parent
details: http://hg.nginx.org/nginx/rev/52367732bcbc
branches:
changeset: 6697:52367732bcbc
user: Vladimir Homutov
date: Fri Sep 16 15:13:24 2016 +0300
description:
Upstream hash: fixed missing upstream name initialization.
diffstat: