Commit 90cf62e7 authored by neverlord's avatar neverlord

added quit() to all testees

parent 1973fe04
...@@ -24,6 +24,7 @@ struct A : event_based_actor { ...@@ -24,6 +24,7 @@ struct A : event_based_actor {
on(atom("go"), arg_match) >> [=](const actor_ptr& next) { on(atom("go"), arg_match) >> [=](const actor_ptr& next) {
handle_response(sync_send(next, atom("gogo"))) ( handle_response(sync_send(next, atom("gogo"))) (
on(atom("gogogo")) >> [=] { on(atom("gogogo")) >> [=] {
cout << "A received gogogo" << endl;
quit(); quit();
}, },
after(std::chrono::seconds(1)) >> [=] { after(std::chrono::seconds(1)) >> [=] {
...@@ -32,7 +33,7 @@ struct A : event_based_actor { ...@@ -32,7 +33,7 @@ struct A : event_based_actor {
); );
}, },
others() >> [=] { others() >> [=] {
cerr << "UNEXPECTED: " << to_string(last_dequeued()) << endl; cerr << "UNEXPECTED: " << to_string(last_dequeued()) << endl;
} }
); );
} }
...@@ -44,7 +45,9 @@ struct B : event_based_actor { ...@@ -44,7 +45,9 @@ struct B : event_based_actor {
void init() { void init() {
become ( become (
others() >> [=]() { others() >> [=]() {
cout << "B forward_to C" << endl;
forward_to(m_buddy); forward_to(m_buddy);
quit();
} }
); );
} }
...@@ -54,7 +57,9 @@ struct C : event_based_actor { ...@@ -54,7 +57,9 @@ struct C : event_based_actor {
void init() { void init() {
become ( become (
on(atom("gogo")) >> [=] { on(atom("gogo")) >> [=] {
cout << "C received gogo (reply)" << endl;
reply(atom("gogogo")); reply(atom("gogogo"));
quit();
} }
); );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment