[comp.sys.sun] Sunview and select - or how to watch the cpu meter get pegged

mason@cs.utexas.edu (Jeff Mason) (01/17/91)

I have a problem that somebody else might have a solution for.  I am
currently converting a large Objective-C program to be a nicely behaved
Sunview application.  

I am using the notifier in an implicit dispatch mode (I call
notify_do_dispatch(); my input loop consists of a call to
select(x,y,..,NULL) and then a read of an internal buffer which is filled
by my input proc.) My call to select has 2 read fds which I am interested
in - one for the input and one for a Socket which I need to monitor.  

The problem is that when I go into the select and do nothing (i.e. no
input from either keyboard/mouse or Socket), the cpu meter hits the roof.
I know that Sunview has overridden the select system call.  This sort of
behaviour makes me worried that a poll is happening within the select
which seems to defeat its purpose.  What is going on here ??

Thanks in advance.