A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
move the simcall template to the kernel::actor namespace
[simgrid.git]
/
teshsuite
/
simix
/
generic-simcalls
/
generic-simcalls.cpp
diff --git
a/teshsuite/simix/generic-simcalls/generic-simcalls.cpp
b/teshsuite/simix/generic-simcalls/generic-simcalls.cpp
index
5e8ddf5
..
758b519
100644
(file)
--- a/
teshsuite/simix/generic-simcalls/generic-simcalls.cpp
+++ b/
teshsuite/simix/generic-simcalls/generic-simcalls.cpp
@@
-35,13
+35,13
@@
static void master()
{
// Test the simple immediate execution:
XBT_INFO("Start");
- simgrid::
simix
::simcall([] { XBT_INFO("kernel"); });
+ simgrid::
kernel::actor
::simcall([] { XBT_INFO("kernel"); });
XBT_INFO("kernel, returned");
// Synchronize on a successful Future<void>:
simgrid::simix::kernel_sync([] {
- return kernel_wait_until(10).then([](simgrid::kernel::Future<void> f
uture
) {
- f
uture
.get();
+ return kernel_wait_until(10).then([](simgrid::kernel::Future<void> f) {
+ f.get();
XBT_INFO("kernel_sync with void");
});
});
@@
-50,8
+50,8
@@
static void master()
// Synchronize on a failing Future<void>:
try {
simgrid::simix::kernel_sync([] {
- return kernel_wait_until(20).then([](simgrid::kernel::Future<void> f
uture
) {
- f
uture
.get();
+ return kernel_wait_until(20).then([](simgrid::kernel::Future<void> f) {
+ f.get();
throw example::exception("Exception throwed from kernel_defer");
});
});
@@
-62,8
+62,8
@@
static void master()
// Synchronize on a successul Future<int> and get the value:
int res = simgrid::simix::kernel_sync([] {
- return kernel_wait_until(30).then([](simgrid::kernel::Future<void> f
uture
) {
- f
uture
.get();
+ return kernel_wait_until(30).then([](simgrid::kernel::Future<void> f) {
+ f.get();
XBT_INFO("kernel_sync with value");
return 42;
});
@@
-72,8
+72,8
@@
static void master()
// Synchronize on a successul Future<int> and get the value:
simgrid::simix::Future<int> future = simgrid::simix::kernel_async([] {
- return kernel_wait_until(50).then([](simgrid::kernel::Future<void> f
uture
) {
- f
uture
.get();
+ return kernel_wait_until(50).then([](simgrid::kernel::Future<void> f) {
+ f.get();
XBT_INFO("kernel_async with value");
return 43;
});
@@
-83,8
+83,8
@@
static void master()
// Synchronize on a successul Future<int> and get the value:
future = simgrid::simix::kernel_async([] {
- return kernel_wait_until(60).then([](simgrid::kernel::Future<void> f
uture
) {
- f
uture
.get();
+ return kernel_wait_until(60).then([](simgrid::kernel::Future<void> f) {
+ f.get();
XBT_INFO("kernel_async with value");
return 43;
});