[comp.lang.pascal] Multi-tasking sources!

derek@sun4dts.dts.ine.philips.nl (derek) (05/08/91)

edb158hbp2@vx24.cc.monash.edu.au writes:




>Has anyone got code to

>Detect the presence and give away time slices for

>1) Double DOS
>2) WIndows 3.0
>3) Top View
>4) MultiLink
>5) Software Carousel
>6) AT BIOS

>or any other multi-tasker that you have source for..

>any source would be appreciated.. preferable in PASCAL..

>Note : I do have detection/time slicing for Desqview

>Peter Davies

I'm also interested in this. However, thinking about it, surely the 
answer is to let the multitasker do it. The major problem is in busy
do-nothing loops - waiting for a key to be pressed or a mouse click
for example. What is needed is an algorithm to do this whithout hogging
the CPU.

Does the event handler in Turbo Vision do this? If not, a better event 
handler is required. 

The sort of (pseudo-) code I'm thinking of is:
If any event pending
  handle and return the event
else
  exit

Therefore you only handle pending events, and don't wait for them. Is
this enough? Are there going to be any problems (missed events for example)?

Best Regards, Derek Carr
DEREK@DTS.INE.PHILIPS.NL           Philips I&E TQV-5 Eindhoven, The Netherlands 
Standard Disclaimers apply.

raster@itsgw.rpi.edu (Jerry D Bain) (05/09/91)

derek@sun4dts.dts.ine.philips.nl (derek) writes:

>>Has anyone got code to
>>Detect the presence and give away time slices for

Although this is a little "up in the air", take a look at the new API for MS-
DOS v5.0.  It has specific support for yielding time-slices (called idle-
loops).  Although DOS may not be out until next month, the API is available
and supported by Windows (right now).  The api is set up such that supporting
it does not force incompatibility with other OS's (or add-ons).

erick@sunee.waterloo.edu (Erick Engelke) (05/09/91)

In article <#x8gvnf@rpi.edu> raster@itsgw.rpi.edu (Jerry D Bain) writes:
>Although this is a little "up in the air", take a look at the new API for MS-
>DOS v5.0.  It has specific support for yielding time-slices (called idle-
>loops).  Although DOS may not be out until next month, the API is available
>and supported by Windows (right now).  The api is set up such that supporting
>it does not force incompatibility with other OS's (or add-ons).
>

Sounds good, is the API publicly available, and where?
-- 
----------------------------------------------------------------------------
Erick Engelke                                       Watstar Computer Network
Watstar Network Guy                                   University of Waterloo
Erick@Development.Watstar.UWaterloo.ca              (519) 885-1211 Ext. 2965