[MonoDevelop] Proposed patch for bug 336368

Lluis Sanchez lluis at ximian.com
Tue Oct 30 07:45:13 EDT 2007


Hi,

Using a queue and a single thread for generating the tag database is an
improvement. However, as Michael pointed out, the thread only needs to
exist when there is something in the queue. It should work more or less
like this:

      * UpdateFileTags adds a new job to the queue. If the parser thread
        is not running start it.
      * The parser thread does all jobs of the queue until it is empty,
        and then dies.

Also, there is something fundamentally incorrect about when projects are
parsed. The OnNodeAdded virtual method in ProjectNodeBuilderExtension is
not the right place for start parsing files. This method is called when
a project is shown in the tree, which is not the same as the project
being added to the solution. OnNodeAdded will be called every time the
tree is refreshed. This is a GUI event, not a data model event. You
should use the events provided by IdeApp.ProjectOperations, such as
EntryAddedToCombine, FileAddedToProject, FileChangedInProject...

Lluis.

El dl 29 de 10 del 2007 a les 18:31 -0600, en/na Marcos Marín va
escriure:
> The attached patch fixes bug 336368[1]. It moves all the threading
> from ProjectNodeBuilderExtension to TagDatabaseManager, the
> UpdateFileTags now only enqueues the file and a thread running in the
> background constantly checks the queue for new jobs every second. 
> 
> Would appreciate some feedback and whether it is ok for me to commit
> and mark the bug as resolved.
> 
> [1]https://bugzilla.novell.com/show_bug.cgi?id=336368
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list



More information about the Monodevelop-list mailing list