About
Docs
Files
Support
Index

Essentials
AutoDocs
Library functions
Cooperate
Process mastering
Debug
Own debugging kit
FGE
Smart modeid pick
Loader
Shared lib. loader
Macros
Helper macros
Structs
All the structures
Logs
Library changelogs
Tools
Progs baked inside

Tools
amiscreen0.3
ansifilter0.1
auto2guide0.1
ccfilter0.1
chipset0.1
cputype0.1
device640.1
dupfilter0.1
expandlogs0.1
findsm0.2
fmpp0.1
fsmount0.1
genanim0.3
gensymtab0.1
hashlab0.4
ktm0.6
linkpoint0.1
logo2ilbm0.1
lpradio0.1
lzwpack0.1
minism0.2
mkheader0.1
modeidctrl0.1
mss0.6
multisum0.3
newterm0.2
numconv0.1
palhack1.1
patmat0.1
pfr0.2
playamitape0.1
qdbflags0.1
qfill0.1
resmodinit0.2
sadctrl0.2
saveassign0.1
setanim0.2
systime0.1
tokendump0.1
uassign0.1
viewlogo0.1
waitback0.4
wrapmount0.1



W
A
I
T
B
A
C
K

waitback-0.4
-------------

---

If you ever wanted to synchronise background processes you surely know that
this is not an easy task. OS comes with the 'wait' command that allows just
to  delay  script  execution  while the process is taking off in a separate
context. But  you never know  if that process started for sure... Would not
it  be better  to sync as fast as  possible and have some feedback on that?
With  'waitback' this  is really simple and your 'startup-sequence' can now
execute programs in correct order and even be optimized for speed!

---

NEWS:

   [21-Mar-2011]   0.4   * Totally enhanced, 'qdev'  assisted version which
                           fixes long sync.



   [09-Mar-2009]   0.3   * Cleaner, better, quicker.



   [25-May-2008]   0.2   * Last  example didnt  work, due to  fact that the
                           value was 0(no checks...).

---

NOTES:

[*]
Requires 68020(no FPU)+,  OS2.04(theoretically)+, 32+ kilos of free memory.

[*]
Comma  delimiter  means 'and',  a logical  and. Negation  can  be made with
patterns per entry.

[*]
Proggy  is  especially useful  when made resident so actions can take place
immediately even when OS is very busy.

---

HELP:

   > waitback ?

     COM=TASK/A,ARG=OPTS,CS=CASE/S,IC=ICHAR/S,TIMEOUT/N



   COM=TASK/A  -  Comma separated task/proc. or  CLI(square bracket braced)
                  names(standard patterns allowed) or address(4097 onwards)
                  or CLI numbers(1 to 4096).

   ARG=OPTS    -  Action to  be  performed. Currently  defined actions are:
                  ;
                  T  -  Wait   for   tasks   or   processes   only(default)
                  P  -  Wait   for   public  message       ports       only
                  B  -  Wait   for   either  tasks/processes  and/or  ports

   CS=CASE/S   -  Turn on case sensitivity. By  default case has no matter.

   IC=ICHAR/S  -  Perform   intercharacter  matching  instead  of  standard
                  name comparison.

   TIMEOUT/N   -  Give  up  after  n  seconds(5 by default). Passing 0 will
                  trigger one time check.

---

USAGE:

   ; Sync to background CLI command
   run >NIL: wait 10
   waitback [wait]

   ; Sync to some Workbench process
   wbrun multiview
   waitback multiview

   ; Sync to Multiview message port
   run multiview
   waitback MULTIVIEW.#? p

   ; Check  for  WB  and  MagicMenu
   waitback Workbench,MagicMenu

   ; Try to detect IDEFIX in the OS
   waitback >NIL: IDEFIX 0
   if warn
     echo "Process not found!"
   else
     echo "Process found!"
   endif

---
megacz
    


No more fear cus pure HTML is here!
Copyright (C) 2013-2014 by Burnt Chip Dominators