@@ -177,7 +177,7 @@ struct await_worker_queue : coro::suspend_always
177177};
178178
179179// Type-erased awaitable.
180- class await_async : public coro ::suspend_always
180+ class await_async
181181{
182182private:
183183 struct Concept
@@ -216,7 +216,7 @@ class await_async : public coro::suspend_always
216216 std::shared_ptr<T> _pimpl;
217217 };
218218
219- const std::shared_ptr<Concept> _pimpl;
219+ const std::shared_ptr<const Concept> _pimpl;
220220
221221public:
222222 // Type-erased explicit constructor for a custom awaitable.
@@ -227,36 +227,14 @@ class await_async : public coro::suspend_always
227227 }
228228
229229 // Default to immediate synchronous execution.
230- await_async ()
231- : _pimpl { std::static_pointer_cast<Concept>(
232- std::make_shared<Model<coro::suspend_never>>(std::make_shared<coro::suspend_never>())) }
233- {
234- }
230+ GRAPHQLSERVICE_EXPORT await_async ();
235231
236232 // Implicitly convert a std::launch parameter used with std::async to an awaitable.
237- await_async (std::launch launch)
238- : _pimpl { ((launch & std::launch::async) == std::launch::async)
239- ? std::static_pointer_cast<Concept>(std::make_shared<Model<await_worker_thread>>(
240- std::make_shared<await_worker_thread>()))
241- : std::static_pointer_cast<Concept>(std::make_shared<Model<coro::suspend_never>>(
242- std::make_shared<coro::suspend_never>())) }
243- {
244- }
233+ GRAPHQLSERVICE_EXPORT await_async (std::launch launch);
245234
246- bool await_ready () const
247- {
248- return _pimpl->await_ready ();
249- }
250-
251- void await_suspend (coro::coroutine_handle<> h) const
252- {
253- _pimpl->await_suspend (std::move (h));
254- }
255-
256- void await_resume () const
257- {
258- _pimpl->await_resume ();
259- }
235+ GRAPHQLSERVICE_EXPORT bool await_ready () const ;
236+ GRAPHQLSERVICE_EXPORT void await_suspend (coro::coroutine_handle<> h) const ;
237+ GRAPHQLSERVICE_EXPORT void await_resume () const ;
260238};
261239
262240// Directive order matters, and some of them are repeatable. So rather than passing them in a
0 commit comments