- 1.6-rc5: Background multitasking

From: Oberon microsystems AG, Tech-Support <"Oberon>
Date: Tue, 25 Sep 2007 17:52:48 +0200


Dear Georgy,
 
thank you very much for the hint. As Robert has pointed out, the problem is caused by how Windows XP handles "busy" applications; on Windows 2000, e.g., updating the log works as expected.
 
We will try and investigate possible solutions for this problem.
 
Thanks again and with best regards,
 
Marc
 
Oberon microsystems AG
www.oberon.ch
+41 (0)44 445 17 51


  _____

From: blackbox{([at]})nowhere.xy
Sent: Montag, 24. September 2007 22:57
To: blackbox
Subject: [BlackBox] - 1.6-rc5: Background multitasking


Hi everybody,
 
I would really like to know, if there is any workaround in BB version 1.5 or RC 1.6 to circumvent the following problem: a program calculates something and writes intermediate results to the Log. If during the calculation a mouse was moved, focus changed etc. the BB Framework freezes out until the calculation is completely finished. A simple example is shown below. Can I call Services.actionHook.Step or whatever to reactivate the Log during the calculation?
Any help would be greatly appreciated...
 
Best regards,
Georgy
 
Example:
 
MODULE TestSum;


IMPORT StdLog, Math, Services;

VAR



i, j, n: INTEGER;



sum: REAL;



t0: LONGINT;

PROCEDURE Do*;

BEGIN

t0:= Services.Ticks();

n:=1000000;

FOR i := 0 TO 9 DO

sum := 0.0;

FOR j := n TO 1 BY -1 DO

sum := sum+1.0/j;

END;

StdLog.Int(i); StdLog.Real( sum-Math.Ln(n)); StdLog.Int(Services.Ticks() - t0); StdLog.Ln;

n := n*2;

END;



END Do;

END TestSum.

 
On 5/26/07, Oberon microsystems AG, Tech-Support <support{([at]})nowhere.xy

Dear Alexander,

thanks for your observation. We intentionally decided not to apply
Marco's entire patch to HostPorts.Rider.Input: We included the statement
WinApi.Sleep(1) but we deliberately left out the proposed call to
Services.actionHook.Step.

The reason for this is that we did not want to break the contract for
objects of type Services.Action as specified in the documentation for
the module Services: "Actions are objects whose Do procedures are called
in a deferred way, when the system is idle again." Calling
Services.actionHook.Step from within HostPorts.Rider.Input would break
this since it leads to actions being executed while the system is not
idle. This could break all sorts of assumptions on which actions should
be able to rely on.

Yes, freezing background tasks while polling for input is an annoyance.
But for the above mentioned reason we would rather live with the problem
than complicating the programming model for Services.Actions. In my
opinion, the real solution would be to attack the problem's root cause
by eliminating the polling loops. This would lead to complete inversion
of control and thus to smoother cooperative multitasking.

with best regards,
Marc


> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Behalf Of Alexander Iljin
> Sent: Samstag, 26. Mai 2007 09:12
> To: Blackbox
> Subject: [BlackBox] - 1.6-rc5: Background multitasking
>
> Hello, BlackBox developers!
>
> I see the following lines in the BlackBox 1.6-rc5 changelog:
>
> Host/Mod/Ports
> - 20060325, mc, Rider.Input changed for the benefit of
> background task response.
>
> But in fact Marco Ciot's contribution is not included. It
> would be if HostPorts.Rider.Input would contain a call to
> Services.actionHook.Step, but it does not. The background
> tasks freeze while user holds a mouse button or is otherwise
> stuck in an Input-related loop.
> I've created a simple module that allows to test that. Here it is:
>
> StdCoder.Decode ..,,
> ..UV....3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
>
> hXhC6FU1xhiZiVBhihgmRiioedhgrZcZRiXFfaqmSrtuGfa4700zdGrr8rmCLL
> CJuyKtYcZRiX
>
> 7.2.s,MtD.,6.5Qw7uP51QCPuP7PNN9F9vQAy1xB.gdj,UBxhYhAbf9P0G2sId
> vPZntgcghghZ
>
> cZRC8T0E.kNS.H.Lt,2.,U08J99SdfJHPNjvQCJuGKfaqmY6MwdONl1QCh0708
> T,U..w.gu4.,
>
> sUGpmWbBxhYhAbndMHT9NY6Mw.sQq2Y6cwB.0.zC,w,wu2E.0.oZ,U00.bnUGL
> u8ro8quGrmCL
>
> WKqtE0E.kN0.,6.I16.M.6.JFyuv.U.2m,.T10.uFq8Ua5V0cUXDF9fR5uPPPP
> 1fP7PNZvQRtI
>
> dHf.2UlbcZpC.c9h0E.8z,U.EEE.E1U.M3MK1.,6.o1.8T5U.E8E.E1U.M3seM
> .3gwP.,6..EB
>
> U.U,2.I3.0ES9.I.cTM.9.e3Y.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
> n4qEc..T9QJ7
>
> 6F,.Cpm.IeZhhjpiZBcXZC2ZVBZvkk0GRqHEuoYmo4KIbG2yavgVBgcCFVSqqE
> L8ssHpmsETfP
>
> dfQT9PNPNZvQRtIQcoJigZcZRiX3Ulb8..umVyKrG5EWKqtCK.Q6AAELUm,..U
> np3.6F6.ZD,6
>
> .636.M00.,..1cUXDJ9XGhighgmRiiQ88pum470,Mwd0UnpZGhighA70,cw5.,
> 6.QJw.0kFF.0
>
> U18J.QiiQ8CJuaLqKKWKqt2Ul1.RVtZBE.8z1U..2,I92U.E,,.RNEd1YCG259
> .G.0..676.16
>
> .6.665hK2., 6TxR.eKZM.M.6.,U0KyB.,..e,2.A.c8U.E.0t.U..61lbAUgQn
> Pt0lLU8ssHor
> kmsQCor..c2E..U6U..HE.6RvuQ0mHCe.az86Utj0GTkWaUKZM03b,...
> --- end of encoding ---
>
> ---=====---
> Alexander
>
> --- BlackBox
> --- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
>
>

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy









Received on Tue Sep 25 2007 - 17:52:48 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:19 UTC