diff --git a/doc/examples/example_simple.tum b/doc/examples/example_simple.tum index 201c733..8ba11cb 100644 --- a/doc/examples/example_simple.tum +++ b/doc/examples/example_simple.tum @@ -20,6 +20,22 @@ main: param: - 123 + - py_func: + name: python long wait + doc: The purpose of this step is to try the tasks "stop" interruption + file: utils.py + func_name: long_wait + param: + - 10 + + - lua_func: + name: lua long wait + doc: The purpose of this step is to try the tasks "stop" interruption + file: lua_func.lua + func_name: long_wait + param: + - 10 + - sleep: name: sleep item dialog: true diff --git a/doc/examples/lua_func.lua b/doc/examples/lua_func.lua index 9b4e38c..58eac85 100644 --- a/doc/examples/lua_func.lua +++ b/doc/examples/lua_func.lua @@ -1,4 +1,5 @@ tm = require("tm") +socket = require("socket") local module = {} @@ -7,4 +8,8 @@ function module.func_to_be_executed(param) return param end +function module.long_wait(sec) + socket.sleep(sec) +end + return module \ No newline at end of file diff --git a/doc/examples/utils.py b/doc/examples/utils.py index 86687d0..26d4221 100644 --- a/doc/examples/utils.py +++ b/doc/examples/utils.py @@ -1,3 +1,5 @@ +from time import sleep + def dummy_exit(useless1, useless2): return True @@ -10,4 +12,7 @@ def funcToBeExecuted (bla): def funcToBeExecuted2 (bla): print(bla) - return blo \ No newline at end of file + return blo + +def long_wait (sec): + sleep(sec) \ No newline at end of file