[KDev4] Modifying interface for ASync Project Opening
Matt Rogers
mattr at kde.org
Thu May 31 20:24:52 UTC 2007
On Thursday 31 May 2007 08:59, dukju ahn wrote:
> The two problems regarding ASync project openning is summarized as,
> 1. We shouldn't create QObject in one thread and call its method
> at other thread.
> 2. QObject should be moved into main GUI thread before the project
> parsing QThread is deleted.
>
> Currently, I can't see use-case for number 2. For number 1, I already
> used QFileSysWatcher. The problem is that QFileSystemWatcher is
> created at main thread, but QFileSystemWatcher::addFile is called
> in IProjectFileManager::parse(), which is run in separate thread.
>
> So I suggest this -- we have additional
> IProjectFileManager::parseCleanup( IProject* ), and call this in GUI
> thread after the recursive parse() thread is finished. In parseCleanup()
> we will complete some delayed QObject stuffs. For example, rather than
> calling QFileSysWatcher::addFile() directly in parsing thread, I'd just
> queue the file list to be added. And in parseCleanup() I actually call
> QFileSysWatcher::addFile()
>
> Anyway, it is evident that project parsing becomes more slower when
> we use thread, although we accquire non-blocking GUI. I'm not sure
> whether this trade-off is valuable or not.
>
> I expect any objections as before :)
>
It's not really valuable and there are ways to make the GUI appear
non-blocking even though it's not really. Let's just go with non-threaded
project parsing.
--
Matt
More information about the KDevelop-devel
mailing list