Yield Process time

Yield Process time

Post by van londerse » Sat, 29 Jun 1996 04:00:00



How can I yield processing time to other programs when my program is
performing a lengthy operation ?How can I yield processing time to
other programs when my program is performing a lengthy operation ?
 
 
 

Yield Process time

Post by Laurent Pointa » Sat, 29 Jun 1996 04:00:00



Quote:

> How can I yield processing time to other programs when my program is
> performing a lengthy operation ?How can I yield processing time to
> other programs when my program is performing a lengthy operation ?

AFAICR, look at the thread manager.

Create a cooperative thread to processyour lenthy operation, and regularly
call "YealdToAnyThread". This will give CPU quotas to other cooperative
threads, and help your program to be nicely written (like if it was on a true
preemptive multithreading, with calls to YeldToAnyThread).

-----------------------------------------------------------------------
Laurent POINTAL
CNRS/CEA/MEN - LURE - Service Informatique Experiences
-----------------------------------------------------------------------
Adresse: LURE - Batiment 209C - Universite Paris XI - 91405 Orsay Cedex
Tel    : 64 46 82 80                            Fax : 64 46 41 48

-----------------------------------------------------------------------

 
 
 

Yield Process time

Post by Rick Gente » Sun, 30 Jun 1996 04:00:00



Quote:

> How can I yield processing time to other programs when my program is
> performing a lengthy operation ?How can I yield processing time to
> other programs when my program is performing a lengthy operation ?

Calling WaitNextEvent() allows other programs to run. You can call it
with a 0 mask if you don't actually want to get any events.

--
Rick Genter
VP of R&D
5D Games, Inc.

 
 
 

1. Yielding processor time w/o WNE?

Is there a way I can yield processor time w/o calling WNE and removing
events from the event queue?

Perhaps calling WNE w/ an event mask that masks everything? or does that
flush the event queue?

For example, If i need to do something at a particular time, I might
want to sit in a loop, yielding processor time, until I get to where I
want to be, and then do whatever it is... then continue with my
processing, without having my event queue munged.

Does EventAvail work for example?

--
Daniel Lakeland: Macintosh Hacker, Mathematics Major, NRA Member.
If you want peace, work for justice. If you want prosperity, work for
free markets.

2. FTP Server Issue

3. Yielding time

4. Shared Borders

5. Regarding Network time,Client time, Remote Time, Server Exection Time

6. ** Auditing For Logon Time & Logoff Time ?

7. Need help finding stop time given start time an elapsed time

8. Sparc 20 Video Question

9. realtime (real time, real-time) or time precision

10. File size view processing time

11. qn on threads-->Starting and then running 2 processes at the same time

12. Creating a sleep() time-out to process files.

13. Multi-threading/real-time processing