[BLACKBOX] Running command and Wait a second

From: Zinn, Helmut <"Zinn,>
Date: Wed, 9 Dec 2009 13:21:06 +0100


Dear Bob,

 

I'm sorry, you didn't understand me.

 

10 years ago I ask for "How to break...?" and I received a similar answer as your one right now.

5 years ago I wrote again about "Have a break" and I received the "Services.DoLater" solution as answer.

This month I send a note about the "Break topic" and I received the solution in the way as I need it.

I’m so glad. I say thanks to Josef ones again. I also have added his suggestions.

 

Now let me go back to my last request:

I have a module TboxTimer published on Component Pascal Collection. There is a procedure:

 

      TboxTimer.Wait(1000);

 

This procedure does exactly what it should do. It waits a second. But it has one big drawback.

It wastes the processors time and the background services are not running.

I believe there will be a better solution for small delays and not frozen the whole system.

 

Regards

 

Helmut Zinn

 

  _____

Von: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Gesendet: Dienstag, 8. Dezember 2009 20:33
An: BLACKBOX{([at]})nowhere.xy
Betreff: Re: [BLACKBOX] Running command and Wait a second

 

> Why is it not possible to have both ways?

 

For the same reason that my shoes are not also a shirt!

 

Oberon was designed for single-user workstations in a network. Module.Delay( time ) implies that the operating system can suspend and resume an arbitrary number of pseudo-concurrent processes. That is a reasonable request of an operating system like Unix which was designed for centralised multi-user systems, but it's not what Oberon was intended to do. Retro-fitting would be quite a significant undertaking, I should think.

 

Bob

 


  _____


From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
Sent: 08 December 2009 12:08
To: BLACKBOX{([at]})nowhere.xy
Subject: [BLACKBOX] Running command and Wait a second

Dear BlackBox users,

 

there are always two different ways to look at the same problem.

 

In the old days of Dos programming the application program calls the operating system functions.

At the today’s Windows programming the operating system calls the application program.

 

The new philosophy is: Don't call us! We call you!

 

Who is the boss?

Who is calling?

Is it the BlackBox runtime system or the running command?

Is it possible to have two chiefs?

 

One way is:

   Services.DoLater(func, time);

and the other way will be:

   Xxxxxxxx.Delay(time); or Xxxxxxxx.Wait(time);

And not continue before the time is passed.

 

Which way to prefer depends on the point from where are you looking to that topic.

 

Why is it not possible to have both ways?

How to suspend the running command for a short time and then reschedule that command at the current position?

During the suspend time the background tasks can run.

 

Regards

 

Helmut Zinn

.

 

 

 

 

 

 

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy


---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Wed Dec 09 2009 - 13:21:06 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:39 UTC