]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: sink: start applets asynchronously
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 17 Jul 2024 13:12:54 +0000 (15:12 +0200)
committerAurelien DARRAGON <adarragon@haproxy.com>
Wed, 17 Jul 2024 14:45:43 +0000 (16:45 +0200)
commit09d69eacf894949381d755a7b0d7a3e3299ce129
treedb26f8e38a476a596004baa85d6c9c19d3b23d7e
parent4de03e42cdc6361cf9d26e9c599469617e88eab5
MEDIUM: sink: start applets asynchronously

Since d9c1d33fa1 ("MEDIUM: applet: Add support for async appctx startup
on a thread subset"), it is now possible to delay appctx's init: for that
it is required that the .init callback is defined on the applet.

When the applet will be processed on the first run, applet API will
automatically finish the applet initialization. Thus we explicitly
call appctx_wakeup() on the applet to schedule it for initial run
instead of calling appctx_init() ourselves.

This is done in prevision of the next patch in order to be able to
schedule the applet on a different thread from the one executing
sink_forward_session_create() function.

Note: 'out_free_appctx' label was removed since it is no longer used.
src/sink.c