From 68ad56c8b61ca1888bb284fb3470f76d7f1131a7 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Fri, 20 Feb 2015 19:30:01 +0000 Subject: [PATCH] Blocking.pm: Change the doc git-svn-id: https://svn.fhem.de/fhem/trunk@8048 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/Blocking.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/Blocking.pm b/fhem/FHEM/Blocking.pm index 317ec9ac5..54ac2fd5a 100644 --- a/fhem/FHEM/Blocking.pm +++ b/fhem/FHEM/Blocking.pm @@ -4,11 +4,15 @@ package main; =pod ### Usage: -sub TestBlocking { BlockingCall("DoSleep", {h=>$defs{CUL}, to=>3,cmd=>"CmdTxt"}, - "SleepDone", 8, "AbortFn", "AbortArg"); } +Define the following in your 99_myUtils.pm +sub TestBlocking($){ BlockingCall("DoSleep", shift, "SleepDone", 5, "AbortFn", "AbortArg"); } sub DoSleep($) { sleep(shift); return "I'm done"; } sub SleepDone($) { Log 1, "SleepDone: " . shift; } sub AbortFn($) { Log 1, "Aborted: " . shift; } +Then call from the fhem prompt +{ TestBlocking(3) } +{ TestBlocking(6) } +and watch the fhem log. =cut