Hello!
On Fri, Sep 16, 2016 at 02:43:49PM -0700, Piotr Sikora wrote:
> 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-benchmar
Thank you for your reply, I get it now.
In other case such as I showed above, it seems we needn't do like the
following ?
if (ev->timer_set) {
ngx_del_timer(ev);
}
2016-09-17 10:48 GMT+08:00 Maxim Dounin :
> Hello!
>
> On Sat, Sep 17, 2016 at 08:25:54AM +0800, 洪志道 wrote:
>
> [...]
>
> >
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 functi
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
ngx_http_test_timer_hand
Hi
As the following codes.
buffer->event->handler = ngx_http_log_flush_handler;
static void
ngx_http_log_flush_handler(ngx_event_t *ev)
{
...
if (ev->timedout) {
ngx_http_log_flush(ev->data, ev->log);
return;
}
...
}
static void
ngx_http_log_flush(ngx_open_fil
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 e83540f825cd8c936f4f7f1e0336279d6644660
details: http://hg.nginx.org/njs/rev/28bc6acceb0e
branches:
changeset: 176:28bc6acceb0e
user: Igor Sysoev
date: Thu Sep 15 18:00:55 2016 +0300
description:
Returning an intptr_t result by rbtree comparison function
decreases overhead required to implement correct addresses
comparison
details: http://hg.nginx.org/njs/rev/70e3b2fc7a8d
branches:
changeset: 175:70e3b2fc7a8d
user: Igor Sysoev
date: Thu Sep 15 17:37:52 2016 +0300
description:
A fix of use-after-free memory bug.
diffstat:
njs/njs_vm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (
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:
src/http/modules/ngx_http_upstream_hash_module.c
# HG changeset patch
# User Alessandro Ghedini
# Date 1474033303 -3600
# Fri Sep 16 14:41:43 2016 +0100
# Node ID 64afed0e819b9af65e7afa89baad3313f1db18d4
# Parent e83540f825cd8c936f4f7f1e0336279d66446606
Use int64 and int32 types with GCC atomics
It's not quite clear if this was done on pu
Hello,
I have a plugin doing the following:
- go through active connections and detect the one listening on a
particular port (e.g. 443)
- register a read event on a different fd that I got with dup(fd of
connection on 443) with a custom handler (I don't want to interrupt the
normal handshake jus
12 matches
Mail list logo