XBT_INFO("kernel, returned");
// Synchronize on a successful Future<void>:
XBT_INFO("kernel, returned");
// Synchronize on a successful Future<void>:
return kernel_wait_until(10).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelSync with void");
return kernel_wait_until(10).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelSync with void");
return kernel_wait_until(20).then([](simgrid::kernel::Future<void> future) {
future.get();
throw std::runtime_error("Exception throwed from kernel_defer");
return kernel_wait_until(20).then([](simgrid::kernel::Future<void> future) {
future.get();
throw std::runtime_error("Exception throwed from kernel_defer");
return kernel_wait_until(30).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelSync with value");
return kernel_wait_until(30).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelSync with value");
XBT_INFO("kernelSync with value returned with %i", res);
// Synchronize on a successul Future<int> and get the value:
XBT_INFO("kernelSync with value returned with %i", res);
// Synchronize on a successul Future<int> and get the value:
return kernel_wait_until(50).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelAsync with value");
return kernel_wait_until(50).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelAsync with value");
XBT_INFO("kernelAsync with value returned with %i", res);
// Synchronize on a successul Future<int> and get the value:
XBT_INFO("kernelAsync with value returned with %i", res);
// Synchronize on a successul Future<int> and get the value:
return kernel_wait_until(60).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelAsync with value");
return kernel_wait_until(60).then([](simgrid::kernel::Future<void> future) {
future.get();
XBT_INFO("kernelAsync with value");