[KDev3.4] BlockingKProcess should be fixed.

dukju ahn dukjuahn at gmail.com
Mon Apr 23 14:43:46 UTC 2007


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()

Anyway, this problem is now removed as we don't use function calls
that uses synchronousRun(). So don't worry about the syncronousRun()
and BKProc's conflict. It is now fine.

But the potential problem still exists...




More information about the KDevelop-devel mailing list