Skip to content

Commit

Permalink
fix: should save iter to coro state
Browse files Browse the repository at this point in the history
add extra sxs store test
  • Loading branch information
seven-mile committed Sep 15, 2023
1 parent ac70490 commit 0611897
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions UFCase.Host.Test/HostManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ namespace winrt::UFCase::Isolation::implementation

for (auto obj : img.SxsStore().GetComponentCollection(L"HyperV-Worker-Control")) {
auto comp = obj.as<Isolation::ComponentModel>();
wprintf(winrt::format(L"Component: {}\n\t{}\n", comp.TextForm(), comp.PayloadPath()).c_str());
}

host.Ping();
Expand Down
4 changes: 2 additions & 2 deletions UFCase.Host/GeneratorIterable.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ namespace winrt::UFCase::Host::implementation

template <typename T>
GeneratorIterable(std::shared_ptr<Generator<T>> iter)
: g(std::make_shared<Generator<IInspectable>>([iter]() -> Generator<IInspectable> {
: g(std::make_shared<Generator<IInspectable>>([](auto iter) -> Generator<IInspectable> {
for (auto &&item : *iter)
{
co_yield box_value(item);
}
}()))
}(iter)))
{
}

Expand Down

0 comments on commit 0611897

Please sign in to comment.