http job doesn't suspend in kde4 and k- vs qprocess

Thiago Macieira thiago at kde.org
Tue Oct 16 11:53:52 BST 2007


Em Tuesday 16 October 2007 12:13:19 koos vriezen escreveu:
> The code is in
> branches/work/kde4/extragear/multimedia/kmplayer/src/kmplayerprocess.cpp
> But it's about code that worked in kde3, like
>
>   void NpStream::slotData (KIO::Job*, const QByteArray& qb) {
>         pending_buf = qb;
>         if (qb.size()) {
>             job->suspend ();
>
> which stopped this job from pushing data.

Suspension isn't immediate. There may be data that is already queued for 
emission and will be handled before the suspend takes effect.

> > > Another thing I'm watching is the replacement of k3process to
> > > qprocess. While k3process is lightweight in passing the data to the
> > > final stdout, qprocess copies the data. So now I'm wondering if I
> > > should use popen or something else and use socketnotifiers instead.
> > > Actually what I really would like is not the data signals itself, but
> > > a unix domain socket where the data could be read from directly from
> > > the slave, as I need it to send to another application anyhow, that
> > > application could read it directly instead. Any other signal, should
> > > still be signal'ed though.
> > > Any advice on the matter would be appreciated.
> >
> > Don't use popen and don't use socket notifiers. Anything else is
> > acceptable. I did not understand what you meant about QProcess.
>
> What is the issue with socketnotifiers? k3process uses these.
> (sometimes I get 100% CPU usages and notice constant QSocketNotifier
> events, I wonder if this might be related)

K3Process is Unix-only.


-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071016/2c9144b9/attachment.sig>


More information about the kde-core-devel mailing list