www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/29/14:41:55

From: Alain Magloire <alainm AT rcsm DOT ece DOT mcgill DOT ca>
Message-Id: <199904291841.OAA04855@mccoy2.ECE.McGill.CA>
Subject: SIGIO non-blocking
To: djgpp-workers AT delorie DOT com
Date: Thu, 29 Apr 1999 14:41:45 -0400 (EDT)
In-Reply-To: <Pine.SUN.3.91.990429185245.10823B-100000@is> from "Eli Zaretskii" at Apr 29, 99 06:54:50 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Bonjour 

I'm timidely setting the stage for some threading stuff and one thing occurred
to me.  Non-blocking I/O.

For example when dealing with user threads a system call can  not
block the whole process/program.  One way to deal with it
is to take say read(),  set the fd non-blocking, if the read() would
block put the thread to sleep(the waiting queue) and set the handler
for SIGIO or SIGPOLL, on receive of the signal select() will
do the demux to see who is ready, and reschedule the threads base
on whatever policy.

Now I don't thing that notifying for an event can be done within
DOS,  Am I wrong ? comments ?



-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019