diff options
| author | maybenotilya <[email protected]> | 2026-04-17 11:57:44 +0300 |
|---|---|---|
| committer | maybenotilya <[email protected]> | 2026-04-17 12:34:55 +0300 |
| commit | a6423bf330c10089d7a0e2aaa8d971d0dcbb3fcf (patch) | |
| tree | 087131eb0146a82cd9c72d1b0a290d8d081c021e /yt/cpp/mapreduce/interface/abortable_stream.cpp | |
| parent | 7bcfb91453e538211ed44e97c57d1104f543f920 (diff) | |
YT-26179: Add Abort for readers
* Changelog entry
Type: feature
Component: cpp-sdk
Add Abort for table readers
commit_hash:be5026883c90d18333f20468946f1e5a5b71839b
Diffstat (limited to 'yt/cpp/mapreduce/interface/abortable_stream.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/interface/abortable_stream.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/interface/abortable_stream.cpp b/yt/cpp/mapreduce/interface/abortable_stream.cpp new file mode 100644 index 00000000000..fc3b8d01f5b --- /dev/null +++ b/yt/cpp/mapreduce/interface/abortable_stream.cpp @@ -0,0 +1,34 @@ +#include "abortable_stream.h" + +#include <yt/cpp/mapreduce/interface/errors.h> + +#include <util/system/yassert.h> + +namespace NYT { + +//////////////////////////////////////////////////////////////////////////////// + +void IAbortableInputStream::Abort() +{ + Y_ABORT("Unimplemented"); +} + +bool IAbortableInputStream::IsAborted() const +{ + return false; +} + +bool IAbortableInputStream::IsAbortedError(const std::exception_ptr& error) +{ + try { + std::rethrow_exception(error); + } catch (const TInputStreamAbortedError& ex) { + return true; + } catch (...) { + return false; + } +} + +//////////////////////////////////////////////////////////////////////////////// + +} // namespace NYT |
