@@ -72,18 +72,6 @@ class ActionCache {
7272 return getImpl (arrayRefFromStringRef (ActionKey.getKey ()), Globally);
7373 }
7474
75- // / Asynchronous version of \c get.
76- std::future<AsyncCASIDValue> getFuture (const CacheKey &ActionKey,
77- bool Globally = false ) const ;
78-
79- // / Asynchronous version of \c get.
80- void getAsync (
81- const CacheKey &ActionKey, bool Globally,
82- unique_function<void (Expected<std::optional<CASID>>)> Callback) const {
83- return getImplAsync (arrayRefFromStringRef (ActionKey.getKey ()), Globally,
84- std::move (Callback));
85- }
86-
8775 // / Cache \p Result for the \p ActionKey computation.
8876 // /
8977 // / \param Globally if true it is a hint to the underlying implementation that
@@ -97,6 +85,23 @@ class ActionCache {
9785 return putImpl (arrayRefFromStringRef (ActionKey.getKey ()), Result, Globally);
9886 }
9987
88+
89+ #ifndef _MSC_VER
90+ // / FIXME: MSVC doesn't compile Error within Promise/Future correctly and will
91+ // / result in unchecked error. Disable AsyncAPIs when using MSVC for now.
92+
93+ // / Asynchronous version of \c get.
94+ std::future<AsyncCASIDValue> getFuture (const CacheKey &ActionKey,
95+ bool Globally = false ) const ;
96+
97+ // / Asynchronous version of \c get.
98+ void getAsync (
99+ const CacheKey &ActionKey, bool Globally,
100+ unique_function<void (Expected<std::optional<CASID>>)> Callback) const {
101+ return getImplAsync (arrayRefFromStringRef (ActionKey.getKey ()), Globally,
102+ std::move (Callback));
103+ }
104+
100105 // / Asynchronous version of \c put.
101106 std::future<AsyncErrorValue> putFuture (const CacheKey &ActionKey,
102107 const CASID &Result,
@@ -111,6 +116,7 @@ class ActionCache {
111116 return putImplAsync (arrayRefFromStringRef (ActionKey.getKey ()), Result,
112117 Globally, std::move (Callback));
113118 }
119+ #endif
114120
115121 virtual ~ActionCache () = default ;
116122
0 commit comments