Changeset 12404 for trunk/Ohana/src/opihi/pantasks/job_threads.c
- Timestamp:
- Mar 11, 2007, 10:56:27 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pantasks/job_threads.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/job_threads.c
r11898 r12404 14 14 void *CheckJobsThread (void *data) { 15 15 16 float next_timeout; 17 16 18 gprintInit (); // each thread needs to init the printing system 17 19 while (1) { … … 25 27 // one run of the task checker 26 28 SerialThreadLock (); 27 CheckJobs ();29 next_timeout = CheckJobs (); 28 30 SerialThreadUnlock (); 29 31 if (VerboseMode() == 2) fprintf (stderr, "J"); 30 // fprintf (stderr, "J"); 31 // usleep (10000); // allow other threads a chance to run 32 33 next_timeout = MIN (next_timeout, 0.1); 34 if (next_timeout > 0.001) { 35 usleep ((int)(1000000*next_timeout)); // allow other threads a chance to run 36 } 32 37 } 33 38 }
Note:
See TracChangeset
for help on using the changeset viewer.
