[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: A new framework for embedding ... without CORBA
From:       Roberto Alsina <ralsina () unl ! edu ! ar>
Date:       1999-10-02 7:54:24
[Download RAW message or body]

On Thu, 30 Sep 1999, Bernd Gehrmann wrote:

> On Thu, 30 Sep 1999, weis wrote:
> 
> > > > You don't need multithreading for that, QTimer + qApp->processEvents()
> > > > in long loops does it as well :-))
> > > 
> > > Do any blocking IO and you're dead. ;-)
> > 
> > Then do non blocking IO :-) Only async DNS is a problem ...
> 
> No. Non-blocking IO is a problem because it forces you to
> write state machines in a very ugly and unnatural way.

I have already written about it, but user space threads are cooler than
they sound ;-)
You get non-blocking I/O (using a special read()/write()/etc replacement,
you get "natural" code because you don't have to do state machines, and
you don't get anywhere near the race conditions "real" threads cause.
Oh, and context switching is actually faster than kernel threads, at least
on Linux ;-)

In NT I think they are called "fibers".

 ("\''/").__..-''"`-. .         Roberto Alsina
 `9_ 9  )   `-. (    ).`-._.`)  ralsina@unl.edu.ar
 (_Y_.)' ._   ) `._`.  " -.-'   Centro de Telematica
  _..`-'_..-_/ /-'_.'           Universidad Nacional del Litoral
(l)-'' ((i).' ((!.'             Santa Fe - Argentina
                                KDE Developer (MFCH)
Not mad, but bound more than a madman is (Romeo and Juliet, Act I Scene II)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic