Store dedicated transform listener thread as a std::unique_ptr#111
Store dedicated transform listener thread as a std::unique_ptr#111
Conversation
|
Follow up to #108 (comment) |
Karsten1987
left a comment
There was a problem hiding this comment.
I don't see the big benefit of converting the raw pointer to a unique_ptr if not putting the rest of the destructor logic in a custom deleter and thus having the unique ptr taking care of the dedicated thread itself.
|
@allenh1 is there any update from your side? Would be great to have this PR landed before dashing. |
|
@Karsten1987 my bad, I'll get to this ASAP. |
fd41a8c to
b813c49
Compare
|
@Karsten1987 ptal -- this is kind of clean, but not my favorite patch. I couldn't get the |
Karsten1987
left a comment
There was a problem hiding this comment.
Can we delete using_dedicated_thread_ then? It looks pretty unnecessary to me. With it, we can also delete the private method dedicatedListenerThread which doesn't do anything.
This should IMO not break API but max ABI, which at this point should still be ok for dashing.
@tfoote opinions?
There was a problem hiding this comment.
my personal style would just be to put the using just above the first (and only) declaration of this type in line 115.
There was a problem hiding this comment.
Since it's only used once that is a lot easier to read.
tfoote
left a comment
There was a problem hiding this comment.
Yes, we can clear the old flag using_dedicated_thread_ and the old unused function dedicatedListenerThread that's replaced by the lambda. We should move the TODO from that method up to the lambda to remind us to come back and implement it with callback groups when callbackgroups become available.
There was a problem hiding this comment.
Since it's only used once that is a lot easier to read.
Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
…nullptr check may be removed Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
Signed-off-by: Hunter L. Allen <hunterlallen@protonmail.com>
7574599 to
8f82d0d
Compare
|
@Karsten1987 / @tfoote Could you please spin up the CI for me? |
|
Woot |
Signed-off-by: Hunter L. Allen hunterlallen@protonmail.com