Implement on_shutdown API
Implemented on_shutdown API, which allows to register functions that will be called when the tarantool stopped. Functions will be called in the reverse order they are registered. So the module developer registers one fuction that starts module termination and waits for its competition. This function should be fast or used an asynchronous waiting mechanism (coio_wait or cord_cojoin for example). Closes #5723 @TarantoolBot document Title: Implement on_shutdown API Implemented on_shutdown API, which allows to register functions that will be called when the tarantool stopped. Functions will be called in the reverse order they are registered. So the module developer registers one fuction that starts module termination and waits for its competition. This function should be fast or used an asynchronous waiting mechanism (coio_wait or cord_cojoin for example).
Showing
- changelogs/unreleased/implement-on-shutdown-api.md 5 additions, 0 deletionschangelogs/unreleased/implement-on-shutdown-api.md
- src/CMakeLists.txt 4 additions, 1 deletionsrc/CMakeLists.txt
- src/exports.h 1 addition, 0 deletionssrc/exports.h
- src/on_shutdown.c 130 additions, 0 deletionssrc/on_shutdown.c
- src/on_shutdown.h 66 additions, 0 deletionssrc/on_shutdown.h
- test/app/CMakeLists.txt 1 addition, 0 deletionstest/app/CMakeLists.txt
- test/app/on_shutdown.lua 7 additions, 0 deletionstest/app/on_shutdown.lua
- test/app/on_shutdown.result 136 additions, 0 deletionstest/app/on_shutdown.result
- test/app/on_shutdown.test.lua 49 additions, 0 deletionstest/app/on_shutdown.test.lua
- test/app/on_shutdownlib.c 126 additions, 0 deletionstest/app/on_shutdownlib.c
Loading
Please register or sign in to comment