[ann] taskRunner (was Re: [ANN] "World's first supercomputer tablet")
Alex Tweedly
alex at tweedly.net
Wed Nov 9 14:38:53 EST 2011
taskRunner is, as I'm sure you can guess, named after Ken Ray's
'stackRunner', but unlike stackRunner it doesn't run "whole" stacks, it
simply performs little "tasks", and does so on behalf of another app
rather than for a user directly.
I started developing taskRunner about 6 months ago, with the intention
of getting to a complete, maybe even polished, state before announcing
it. However, I got it basically working 4 months ago, and haven't had
any time to work on it since then; I've now decided that it would be
better to make it available as a "sample" or "demo" quality stack in the
hope that it will be useful, or at least interesting, for some folks.
This was partly triggered by a couple of recent threads, on socket
inter-app communication and on the Asus tablet. Now that even tablets
have multiple cores, and our Livecode apps are leaving 75% of that power
unused, it's worth investigating how we can re-factor our apps to allow
us to make more use of multi-cores or processors.
Many of us have found that our apps have some operations that take a
long time (long enough that we need to re-write small parts to make them
more asynchronous). This can be as simple as adding a "wait with
messages" or "send in time" to the critical loops so that our app can
remain responsive, and/or be interrupted and/or give progress updates.
In many cases that same refactoring (taken a little bit further) will
allow the use of taskRunner to hive off the actual performing of the
task to a separate process.
Although I haven't worked on taskRunner for months, I do use it every
week, almost every day, and in some cases it has reduced my waiting time
to 25% or 30% of what it was before (and made my MacBook into a nice
warm space-heater :-).
As well as the actual taskRunner stack, you can find
- a library to make it easy to split out the tasks and communicate
with taskRunner
- a test stack to demonstrate some simple uses of taskRunner
- a few simple 'task stacks' to use in the demo
This is all at www.tweedly.org/taskRunner and I will try to get more
docs and useful task stacks written up. If you look at it and find it
useful or interesting, please do let me know if there is anything
particularly confusing or in need of better explanation.
Thanks
-- Alex.
More information about the use-livecode
mailing list