Skip to content

Commit

Permalink
libpressio version 0.34.3
Browse files Browse the repository at this point in the history
- Bug Fix: Previously, when clone was introduced, it would not also clone
  the metrics object associated with a particular compressor plugin.  This
  was unintended.  Now, the metrics object is cloned to improve thread
  safety
  • Loading branch information
robertu94 committed Feb 28, 2020
1 parent 4733326 commit d5ccdfd
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
project(libpressio VERSION "0.34.2" LANGUAGES CXX C)
project(libpressio VERSION "0.34.3" LANGUAGES CXX C)

#correct was to set a default build type
# https://blog.kitware.com/cmake-and-the-default-build-type/
Expand Down
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright © 2020 , UChicago Argonne, LLC
All Rights Reserved
[libpressio, Version 0.34.2]
[libpressio, Version 0.34.3]
Robert Underwood
Argonne National Laboratory

Expand Down
21 changes: 21 additions & 0 deletions include/libpressio_ext/cpp/compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ class libpressio_compressor_plugin {
public:

libpressio_compressor_plugin() noexcept;
libpressio_compressor_plugin(libpressio_compressor_plugin const& plugin):
error(plugin.error),
metrics_plugin(plugin.metrics_plugin->clone())
{}
libpressio_compressor_plugin& operator=(libpressio_compressor_plugin const& plugin)
{
error = plugin.error;
metrics_plugin = plugin.metrics_plugin->clone();
return *this;
}
libpressio_compressor_plugin(libpressio_compressor_plugin&& plugin) noexcept:
error(std::move(plugin.error)),
metrics_plugin(std::move(plugin.metrics_plugin))
{}
libpressio_compressor_plugin& operator=(libpressio_compressor_plugin&& plugin) noexcept
{
error = std::move(plugin.error);
metrics_plugin = std::move(plugin.metrics_plugin);
return *this;
}


/** compressor should free their global memory in the destructor */
virtual ~libpressio_compressor_plugin();
Expand Down

0 comments on commit d5ccdfd

Please sign in to comment.