Review Request: Remove locks from thread local SearchContext objects

Aaron Seigo aseigo at kde.org
Sun Feb 10 04:03:58 CET 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://matt.rogers.name/r/97/
-----------------------------------------------------------

(Updated 2008-02-09 21:03:58.392973)


Review request for Plasma.


Summary
-------

We make a thread-local copy of the SearchContext for each Runner. As such, there is no need to do locking on the thread-local copy. This patch also adds assertions on the non-thread safe methods (e.g. addExactMatch) which are used from thread-local copies, but which should never be used in the shared version.

Also adds a addMatchesTo(SearchContext) which encapsulates this code and makes it safe to delete matches on object deletion, preventing possible memory leaks on SearchContext destruction.

BIC, though SC.


Diffs
-----

  /trunk/KDE/kdebase/workspace/libs/plasma/searchcontext.h
  /trunk/KDE/kdebase/workspace/libs/plasma/searchcontext.cpp

Diff: http://matt.rogers.name/r/97/diff


Testing
-------

Compiled in KRunner, using it currently for regular usage.


Thanks,

Aaron



More information about the Panel-devel mailing list