Path: utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request From: onecom!mason@cs.utexas.edu (Jeff Mason) Newsgroups: comp.sys.sun Subject: Sunview and select - or how to watch the cpu meter get pegged Keywords: Windows Message-ID: <1309@brchh104.bnr.ca> Date: 16 Jan 91 22:35:44 GMT Sender: news@brchh104.bnr.ca Organization: Sun-Spots Lines: 17 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 10, Issue 17, message 12 X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu 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.