box: implement on_shutdown triggers
Add on_shutdown triggers which are run by a preallocated fiber on shutdown and make it possible to register them via box.ctl.on_shutdown() Make use of the new triggers: now dedicate an on_shutdown trigger to break event loop instead of doing it explicitly from signal handler. The trigger is run last, so that all other on_shutdown triggers may yield, sleep and so on. Also make sure we can register lbox_triggers without push_event function in case we don't need one. Part of #1607
Showing
- src/box/box.cc 2 additions, 0 deletionssrc/box/box.cc
- src/box/box.h 3 additions, 0 deletionssrc/box/box.h
- src/box/lua/ctl.c 8 additions, 0 deletionssrc/box/lua/ctl.c
- src/lua/trigger.c 4 additions, 1 deletionsrc/lua/trigger.c
- src/main.cc 58 additions, 2 deletionssrc/main.cc
- test/box/misc.result 72 additions, 0 deletionstest/box/misc.result
- test/box/misc.test.lua 32 additions, 0 deletionstest/box/misc.test.lua
Loading
Please register or sign in to comment