diff options
author | Justin Berger <j.david.berger@gmail.com> | 2017-07-27 13:11:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-11-29 21:36:31 (GMT) |
commit | a3abb85c6ff5aebe2220ae612512a434b491eedd (patch) | |
tree | 155409d97d1bca65c774c999c56e1f171ab0a3ad /Source/CMakeLists.txt | |
parent | 90f8db269fcc6978badd93b5f985dee2e01feab3 (diff) | |
download | CMake-a3abb85c6ff5aebe2220ae612512a434b491eedd.zip CMake-a3abb85c6ff5aebe2220ae612512a434b491eedd.tar.gz CMake-a3abb85c6ff5aebe2220ae612512a434b491eedd.tar.bz2 |
Add RAII handles for libuv handle types
The `uv_*_t` handle types are closed by `uv_close`, but the semantics
are tricky. Calling `uv_close` may not close immediately. Instead it
hands ownership to the uv loop to which the handle is currently
attached. When the loop decides to close it, a callback is used to
allow the `uv_close` caller to free resources.
Provide an abstraction layer as `cm::uv_*_ptr` types corresponding to
the `uv_*_t` handle types. Each pointer is either empty (`nullptr`)
or has an initialized handle attached to a loop. Use move semantics
to ensure a single owner of the handle so that clients can predict
when the handle is destroyed.
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 33ab093..88c63e1 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1029,6 +1029,7 @@ list(APPEND _tools cmake) target_link_libraries(cmake CMakeLib) add_library(CMakeServerLib + cmUVHandlePtr.h cmUVHandlePtr.cxx cmConnection.h cmConnection.cxx cmFileMonitor.cxx cmFileMonitor.h cmPipeConnection.cxx cmPipeConnection.h |