]> git.ipfire.org Git - thirdparty/samba.git/commit
messaging: Deliver messages only once
authorVolker Lendecke <vl@samba.org>
Sat, 17 Jun 2017 06:48:16 +0000 (08:48 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 21 Jun 2017 05:30:39 +0000 (07:30 +0200)
commita2436b67e5dd47d955a3bea2b83e0693b627ab96
treedf204d66f0fb2f6f82d02d7414265c2c99dd4205
parent46a1ae5d71dd5266d87a3563ca8e800912138327
messaging: Deliver messages only once

This survived an autobuild, so no subsystem strictly needs this anymore. In
particular the notify subsystem has been rewritten.

Why this patch? It removes some complexity from core code, and it reduces the
potential memory overconsumption: Right now I'm working on a g_lock_ping_pong
test. This test does a lot of messaging_filtered_read_send calls in a tight
loop on a nested event context. With the current code we let the
messaging_filtered_read code consume the message that arrives, but it also
posts it for consumption by the main event context attached to the messaging
context with its "classic" callback. This test never comes back to the main
event context, so it accumulates more and more self-posted messages. That's
just unnecessary, given that due to the successful autobuild nothing but the
read1 test makes use of the "multicasting" of messages.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 21 07:30:39 CEST 2017 on sn-devel-144
source3/lib/messages.c
source3/torture/test_messaging_read.c