Skip to content

Commit

Permalink
[pjrt] Make sure that PjRtFuture<> is copyable and moveable
Browse files Browse the repository at this point in the history
Explicitly add copy and move constructors/assignment to make sure that stateless
future stays copyable and moveable.

PiperOrigin-RevId: 627474702
  • Loading branch information
ezhulenev authored and tensorflower-gardener committed Apr 23, 2024
1 parent 308c605 commit 099713a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions third_party/xla/xla/pjrt/pjrt_future.h
Expand Up @@ -395,6 +395,12 @@ class PjRtFuture<void> : public internal::PjRtFutureBase<std::nullopt_t> {

PjRtFuture() = default;

PjRtFuture(const PjRtFuture& other) = default;
PjRtFuture& operator=(const PjRtFuture& other) = default;

PjRtFuture(PjRtFuture&& other) = default;
PjRtFuture& operator=(PjRtFuture&& other) = default;

// Constructor for an already-available PjRtFuture. OkStatus means that future
// is already successfully completed. Error means that future is already
// completed with an error.
Expand Down

0 comments on commit 099713a

Please sign in to comment.