yab | yet another Basic for HAIKU
A barberpole spinner - Printable Version

+- yab | yet another Basic for HAIKU (https://yab.orgfree.com/forum)
+-- Forum: Programming in yab (https://yab.orgfree.com/forum/forumdisplay.php?fid=1)
+--- Forum: Snippets (https://yab.orgfree.com/forum/forumdisplay.php?fid=3)
+--- Thread: A barberpole spinner (/showthread.php?tid=69)

Pages: 1 2


RE: A barberpole spinner - clasqm - 05-10-2016

Not forgetting it, bbj. Never knew it was there. I keep learning new things. ;-)


RE: A barberpole spinner - bbjimmy - 05-11-2016

(05-10-2016, 03:23 PM)clasqm Wrote: Not forgetting it, bbj. Never knew it was there. I keep learning new things. ;-)

I fixed the usage documentation: https://github.com/bbjimmy/yab-lib/blob/master/spinner/spinner.md Showing how to use innter application messaging for the spinner. This kind of usage of inter program messaging can make a yab program run as a multi-threaded, multi process program.


RE: A barberpole spinner - clasqm - 05-13-2016

first attempt at a utlity based on Jim's library: https://dl.dropboxusercontent.com/u/1043447/binaries/barberpole-0.1-1-x86_gcc2.hpkg


RE: A barberpole spinner - clasqm - 05-17-2016

How to use the barberppole utility:

I have this Java app that is very slow to boot up as it searches for its constituent parts and calls home to look for updates. when it is done it creates a settings file or updates it if it exists already. We can use that settings file to see if we need to shut down the barberpole.

Code:
#!/boot/system/bin/bash
## who am i? ##
_script="$(readlink -f ${BASH_SOURCE[0]})"
## Delete last component from $_script ##
_base="$(dirname $_script)"
cd $_base
jconvert_run=/boot/home/MSNCurrency.dat
rm -f $jconvert_run
barberpole --alert --msg=Sorry, this Java app takes a while to load. Please wait &
java -Xmx1024m -jar jconvert.jar &
until [ -e  $jconvert_run ]
do
     sleep 1
done
hey barberpole quit



Free Web Hosting