pitrou commented on a change in pull request #12408:
URL: https://github.com/apache/arrow/pull/12408#discussion_r813981342
##########
File path: cpp/src/arrow/util/thread_pool.h
##########
@@ -201,6 +201,27 @@ class ARROW_EXPORT Executor {
// Executor. Returns false if this Executor does not support this property.
virtual bool OwnsThisThread() { return false; }
+ /// \brief An interface to represent something with a custom destructor
+ ///
+ /// \see KeepAlive
+ class Resource {
+ public:
+ virtual ~Resource() = default;
+ };
+
+ /// \brief Keeps a resource alive until all executor threads have terminated
Review comment:
Nit, sorry :-)
```suggestion
/// \brief Keep a resource alive until all executor threads have terminated
```
##########
File path: cpp/src/arrow/util/thread_pool.h
##########
@@ -201,6 +201,27 @@ class ARROW_EXPORT Executor {
// Executor. Returns false if this Executor does not support this property.
virtual bool OwnsThisThread() { return false; }
+ /// \brief An interface to represent something with a custom destructor
+ ///
+ /// \see KeepAlive
+ class Resource {
Review comment:
Hmm... does this need ARROW_EXPORT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]