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

List:       kde-core-devel
Subject:    Re: Reflexion about NetAccess (enter_loop/exit_loop)
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-06-28 9:28:17
[Download RAW message or body]

On Wed, Jun 28, 2000 at 01:27:37AM +0200, Michael Matz wrote:
> Ho,
> 
> On Tue, 27 Jun 2000, David Faure wrote:
> > 
> > But if I'm right about this, shouldn't NetAccess have a static flag
> > that prevents multiple concurrent invocations ?
> 
> Then the question arises, what to do, when its reentered. Simply return
> with an error like EAGAIN, or queue the request, and check that queue on
> each NetAccess exit.
But even queueing doesn't solve the problem, does it ?
We want the control(sp?) to wait for the first operation to finish....

> Or disable the enter/exit_loop tricks for those
> additional invocations.
That's impossible.
The point in NetAccess is that it waits for the i/o operation to finish.
If you disable the trick, you return right after you _started_ the
operation, and no error code nor result is available.

> The first (EAGAIN) means, that all NetAccess are
> forcibly serialized, which I'm not sure is really wanted, after all,
> NetAccess is all about asynchronity ;)
Well, it's rather about synchronicity !
I think you're confusing with KIO::Job ?

Forcing serialisation is fine with me. Just like you can't make
two system stat() at the same time (because they're _synchronous_ !),
you shouldn't be allowed to do two network-transparent stat()
at the same time _IF_ using NetAccess. For async I/O, KIO::Job does the job
just fine.

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

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

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