----boundary-LibPST-iamunique-557511759_-_-
Content-type: text/plain
O.k.
If you look at it that way, yes, then the system will be blocked against
user interaction.
BUT: the background processing will be done, i.e. all registered actions
will execute their Do method as requested by them through Services.DoLater.
According to me it doesn't matter that the system freezes during such a call
to Wait.Time.
To be honest such a function to me appears to be the most contradicting one
with respect to multi tasking.
As I understood, Helmut wanted to use it to easily port old Oberon software.
Just think of the fact that ONLY one task of all tasks in a multitasking
system will ever be able to execute Wait.Time, and this task will always be
the interactive task in BB.
All other tasks, i.e. the background tasks will simply use the DoLater
function, which does nothing else but wait the desired time.
NOW, if anybody wanted to have such a Wait.Time function to be useful for
background tasks, then he had to really implement threads instead of actions
in BB.
Note that a thread always needs to have its separated program stack.
In other words, that would be a bigger thing and I believe it contradicts
the philosophy of cooperating multitasking.
I'm convinced that everything can be implemented using actions and the
result code will even be more efficient, more readable AND especially more
ROBUST within a framework like the one of BB.
Marco Ciot
-----Original Message-----
From: blackbox{([at]})nowhere.xy
G. Danforth
Sent: Friday, May 12, 2006 19:52
To: BlackBox Mailing List
Subject: [BlackBox] - A Cookbook Topic: "Delay", "WaitUntil" and
"Let'ssee actions"
Marco,
If the following is what you meant then it doesn't work for me. The
cursor remains as the pointing hand
when the commandor is clicked and no actions can be initiated during the
wait time. So what did you
really mean?
-Doug
-----------------
MODULE Wait;
IMPORT Services, Out:=StdLog;
PROCEDURE Time (ms: INTEGER);
VAR time: LONGINT;
BEGIN
time := Services.Ticks() + ms;
WHILE Services.Ticks() < time DO
Services.actionHook.Step
END
END Time;
PROCEDURE Test*;
BEGIN
Out.String("start..");
Time(10000);
Out.String("stop.");
Out.Ln;
END Test;
END Wait.
--------------------
Marco Ciot wrote:
> Hello Helmut
>
> Sorry for not contributing earlier to this subject.
> I quickly read the follow ups and didn't really see a reason why to do
such
> fuzzy things... sorry folks :)
>
> The solution to this indeed is to call Services.actionHook.Step during a
> timed loop.
> This procedure exactly does the stepping of the background tasks
> (Services.Actions) and works fine while being called on command level
also.
> (It should not be called by Actions, however!)
> (Well, let me also clarify that this is my understanding of the module
> Services and not a documented feature.)
>
> How come you didn't try this yourself after having suggested it in
xyBoss3?
>
> Note that by adding such a call in HostPorts.Input followed by a
conditional
> Kernel.Sleep and having Services.actionHook.Step a little bit more robust
> towards calls from anywhere (even Actions) any BB system becomes much more
> responsive and won't do any excess CPU heating while tracking the mouse,
> e.g. making a text selection ;)
>
> Regards
> Marco Ciot
>
>
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-557511759_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIE8uay5ccGFyDQpJZiB5b3UgbG9vayBhdCBpdCB0
aGF0IHdheSwgeWVzLCB0aGVuIHRoZSBzeXN0ZW0gd2lsbCBiZSBibG9ja2VkIGFnYWluc3RccGFy
DQp1c2VyIGludGVyYWN0aW9uLlxwYXINCkJVVDogdGhlIGJhY2tncm91bmQgcHJvY2Vzc2luZyB3
aWxsIGJlIGRvbmUsIGkuZS4gYWxsIHJlZ2lzdGVyZWQgYWN0aW9uc1xwYXINCndpbGwgZXhlY3V0
ZSB0aGVpciBEbyBtZXRob2QgYXMgcmVxdWVzdGVk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