Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
d5472078
Commit
d5472078
authored
Oct 15, 2020
by
legoc
Browse files
(split) Reviewed public interface of waitFor
parent
bb2f5af5
Changes
2
Show whitespace changes
Inline
Side-by-side
include/Application.h
View file @
d5472078
...
...
@@ -209,7 +209,7 @@ public:
State
waitFor
(
StateHandlerType
handler
=
nullptr
);
State
waitFor
(
int
states
,
StateHandlerType
handler
=
nullptr
);
State
waitFor
(
int
states
,
const
std
::
string
&
eventName
,
StateHandlerType
handler
=
nullptr
);
State
waitFor
(
const
std
::
string
&
eventName
);
void
cancelWaitFor
();
...
...
src/Application.cpp
View file @
d5472078
...
...
@@ -623,16 +623,16 @@ State Instance::waitFor(int states, const std::string& eventName, StateHandlerTy
return
m_lastState
;
}
State
Instance
::
waitFor
(
int
states
,
const
std
::
string
&
eventName
,
StateHandlerType
handler
)
{
return
waitFor
(
states
,
eventName
,
handler
,
true
);
}
State
Instance
::
waitFor
(
int
states
,
StateHandlerType
handler
)
{
return
waitFor
(
states
,
""
,
handler
);
return
waitFor
(
states
,
""
,
handler
,
true
);
}
State
Instance
::
waitFor
(
StateHandlerType
handler
)
{
return
waitFor
(
0
,
""
,
handler
);
return
waitFor
(
0
,
""
,
handler
,
true
);
}
State
Instance
::
waitFor
(
const
std
::
string
&
eventName
)
{
return
waitFor
(
0
,
eventName
,
nullptr
,
true
);
}
void
Instance
::
cancelWaitFor
()
{
...
...
@@ -821,7 +821,7 @@ std::unique_ptr<Subscriber> Subscriber::create(Instance & instance, const std::s
}
// waiting for the publisher
State
lastState
=
instance
.
waitFor
(
0
,
publisherName
);
State
lastState
=
instance
.
waitFor
(
publisherName
);
// state cannot be terminal or it means that the application has terminated that is not planned.
if
(
lastState
==
SUCCESS
...
...
@@ -1060,7 +1060,7 @@ std::unique_ptr<Requester> Requester::create(Instance & instance, const std::str
int
responderPort
=
response
[
message
::
RequestResponse
::
VALUE
].
GetInt
();
if
(
responderPort
==
-
1
)
{
// Wait for the responder port.
instance
.
waitFor
(
0
,
responderPortName
);
instance
.
waitFor
(
responderPortName
);
// Retry to connect.
reply
=
instanceRequestSocket
->
request
(
request
);
...
...
Shervin Nourbakhsh
@nourbakhsh
mentioned in commit
46e44691
·
Apr 23, 2021
mentioned in commit
46e44691
mentioned in commit 46e44691a03808a23a464818487b0dd014a9c57e
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment