Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Events in linux

Author: Vincent Diepeveen

Date: 04:42:55 04/25/01

Go up one level in this thread


On April 24, 2001 at 23:50:37, Robert Hyatt wrote:

>On April 24, 2001 at 22:50:41, Hristo wrote:
>
>>select(..) doesn't do it. ;-(((
>>wish it did!!!!
>>select(..) works within a different domain and in general
>>can not compare to WaitForMultipleObjects. ;-(
>>WaitForMultipleObjects is, kind of like, select(..) on steroids!
>>...
>>The unix style is to keep things simple, which pays off when there
>>is good design!
>>
>>hristo

basically i want 2 things
  a) i want a search process/thread to idle
  b) when the i/o process decides that it is time to let the
     search start i want to *directly* let the search wake up.

what i do now is similar to:
  for( ;; ) {
    sleep(100);
    if( sharedtree->gosearch || sharedtree->quit )
      break;
  }

I don't want to waste 100ms for each process!

WaitForMultipleObjects is not using 100ms as far as i know to
wake up!

What to do in linux to get same effect?

>why can't you produce the same effect with a group of descriptors?  Writing
>to such a descriptor from the "other end" will set that condition so that
>select() will terminate...  IE it seems like a small kludge, but it would
>seem to allow the same sort of capability...???



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.