simplify example

master
Daniel Kolesa 2017-03-18 01:08:21 +01:00
parent b4b7224dd0
commit 495c08602f
1 changed files with 1 additions and 5 deletions

View File

@ -13,11 +13,7 @@ void foo() {
auto c = sched.make_channel<int>();
auto f = [&c](auto half) {
int ret = 0;
for (int i: half) {
ret += i;
}
c.put(ret);
c.put(foldl(half, 0));
};
sched.spawn(f, h1);
sched.spawn(f, h2);