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
f032d6ff
Commit
f032d6ff
authored
Apr 22, 2022
by
legoc
Browse files
Renamed App cancelWaitFor() in cancel()
parent
e27fcebd
Changes
8
Hide whitespace changes
Inline
Side-by-side
cpp/api/include/Application.h
View file @
f032d6ff
...
...
@@ -816,7 +816,7 @@ public:
/**
* Cancels the blocking waitFor() in another thread.
*/
void
cancel
WaitFor
();
void
cancel
();
/**
* Gets the last state.
...
...
cpp/api/src/base/Application.cpp
View file @
f032d6ff
...
...
@@ -720,7 +720,7 @@ bool App::kill() {
State
App
::
waitFor
(
int
states
,
KeyValue
&
keyValue
,
bool
blocking
)
{
// Create a scoped waiting so that it is removed at the exit of the function.
Waiting
scopedWaiting
{
std
::
bind
(
&
App
::
cancel
WaitFor
,
this
)};
Waiting
scopedWaiting
{
std
::
bind
(
&
App
::
cancel
,
this
)};
// Test the terminal state.
if
(
m_lastState
==
SUCCESS
...
...
@@ -814,8 +814,8 @@ State App::waitFor(KeyValue& keyValue) {
return
waitFor
(
0
,
keyValue
,
true
);
}
void
App
::
cancel
WaitFor
()
{
cancel
(
m_id
);
void
App
::
cancel
()
{
EventListener
::
cancel
(
m_id
);
}
State
App
::
getLastState
()
{
...
...
java/api/src/main/java/fr/ill/ics/cameo/base/App.java
View file @
f032d6ff
...
...
@@ -757,7 +757,7 @@ public class App extends EventListener {
/**
* Cancels the blocking waitFor() in another thread.
*/
public
void
cancel
WaitFor
()
{
public
void
cancel
()
{
cancel
(
id
);
}
...
...
java/api/src/main/java/fr/ill/ics/cameo/base/AppWaiting.java
View file @
f032d6ff
...
...
@@ -34,7 +34,7 @@ public class AppWaiting extends Waiting {
@Override
public
void
cancel
()
{
instance
.
cancel
WaitFor
();
instance
.
cancel
();
}
@Override
...
...
python/api/src/Application.cpp
View file @
f032d6ff
...
...
@@ -137,7 +137,7 @@ PYBIND11_MODULE(cameopy, m) {
.
def
(
"waitFor"
,
py
::
overload_cast
<
int
>
(
&
App
::
waitFor
),
"states"
_a
,
py
::
call_guard
<
py
::
gil_scoped_release
>
())
.
def
(
"cancel
WaitFor
"
,
&
App
::
cancel
WaitFor
,
py
::
call_guard
<
py
::
gil_scoped_release
>
())
.
def
(
"cancel"
,
&
App
::
cancel
,
py
::
call_guard
<
py
::
gil_scoped_release
>
())
.
def
(
"getLastState"
,
&
App
::
getLastState
,
py
::
call_guard
<
py
::
gil_scoped_release
>
())
.
def
(
"getActualState"
,
&
App
::
getActualState
,
py
::
call_guard
<
py
::
gil_scoped_release
>
())
.
def
(
"getPastStates"
,
&
App
::
getPastStates
,
py
::
call_guard
<
py
::
gil_scoped_release
>
())
...
...
tests/cpp/src/TestCancel.cpp
View file @
f032d6ff
...
...
@@ -71,7 +71,7 @@ int main(int argc, char *argv[]) {
// Start thread.
thread
cancelThread
([
&
]
{
this_thread
::
sleep_for
(
chrono
::
seconds
(
1
));
stopApplication
->
cancel
WaitFor
();
stopApplication
->
cancel
();
});
State
state
=
stopApplication
->
waitFor
();
...
...
tests/java/src/fr/ill/ics/cameo/test/TestCancel.java
View file @
f032d6ff
...
...
@@ -88,7 +88,7 @@ public class TestCancel {
public
void
run
()
{
try
{
Thread
.
sleep
(
1000
);
stopApplication
.
cancel
WaitFor
();
stopApplication
.
cancel
();
}
catch
(
InterruptedException
e
)
{
}
...
...
tests/python/src/testcancel.py
View file @
f032d6ff
...
...
@@ -9,7 +9,7 @@ def cancelAll():
def
cancelWaitFor
(
instance
):
time
.
sleep
(
1
)
instance
.
cancel
WaitFor
()
instance
.
cancel
()
def
cancelWaitForSubscribers
(
publisher
):
time
.
sleep
(
1
)
...
...
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