[KDev3.4] BlockingKProcess should be fixed.

Andreas Pakulat apaku at gmx.de
Mon Apr 23 14:56:31 UTC 2007


On 23.04.07 23:43:46, dukju ahn wrote:
> 2007/4/23, Andras Mantia <amantia at kde.org>:
> > On Sunday 22 April 2007, dukju ahn wrote:
> > > As in my recent posts named "SVNFileInfoProvider::status",
> > > BlockingKProcess and KIO::NetAccess::synchronousRun()
> > > conflicts each other. This conflict happens because each class
> > > use the same qApp->enter_loop(), exit_loop().
> > >
> > > 1. Reasons of conflict.
> > >
> > > When CppSupportPart opens it runs BlockingKProc::enter_loop()
> > > And the stackframe piles over that. At some point, synchronousRun()
> > > is called on top of the stackframe.
> > > synchronousRun() also calls enter_loop(), and the looplevel
> > > becomes three.
> > >
> > > At this point child process of BlockingProc finishes and exit_loop()
> > > is called by the slot. This exit_loop() causes synchronousRun()
> > > return, and the BlockingProc has no way but to wait timeout.
> > >
> > > 2. Suggestions.
> > >
> > > It would be good if the blocking mechanism can be implemented
> > > by different method. But if this is hard, the BlockingKProc's timeout
> > > should be more short, because BKProc should wait 60 seconds
> > > to exit the loop, when NetAccess::syncRun() and BKProc conflicts,
> > >
> > > The timeout can be lowered by 3~4 seconds, since the processes
> > > used by KDev is simple ones like "gcc -v nullfile.cpp"
> > >
> > > Any opinions??
> >
> > BlockingKProcess uses the very same method as NetAccess (the idea was
> > copied from there). The question is *how* can synchronousRun be called
> > while the BlockingKProcess runs a second event loop.
> 
> In a BKProc's second loop, events in event queue are dispatched one by one.
> Among these, there is some event that emits signals and subsequent slots.
> It is that slot that invokes function calls which contains synchronousRun()

Huh? A BKProc executes and external process, why does that trigger kio?
Or do I misunderstand something?

Andreas

-- 
Your aim is high and to the right.




More information about the KDevelop-devel mailing list