20. future/promiseの例
future<int> get(); // promises an int will be produced eventually
future<> put(int) // promises to store an int
void f() {
get().then([] (int value) {
put(value + 1).then([] {
std::cout << "value stored successfullyn";
});
});
}
21. Continutions
future<int> get(); // promises an int will be produced eventually
future<> put(int) // promises to store an int
void f() {
get().then([] (int value) {
return put(value + 1);
}).then([] {
std::cout << "value stored successfullyn";
});
}
.then()による処理の継続
23. 選べる環境
• Linux(実機 or 仮想化環境)
• Seastar TCP on DPDK
• Seastar TCP on vhost-net + tap + bridge
• Linux socket
• OSv(仮想化環境)
• Sestar TCP on DPDK(work-in-progress)
• Sestar TCP on virtio-net
• Seastar TCP on Xen PV NIC
• OSv socket
• OSv on 実機??(in future)