Index: add call to get rid of filter subprocesses at end of indexing (for the GUI thread)
This commit is contained in:
@@ -141,6 +141,17 @@ void returnMimeHandler(Dijon::Filter *handler)
|
||||
}
|
||||
}
|
||||
|
||||
void clearMimeHandlerCache()
|
||||
{
|
||||
typedef multimap<string, Dijon::Filter*>::value_type value_type;
|
||||
map<string, Dijon::Filter *>::iterator it;
|
||||
for (it = o_handlers.begin(); it != o_handlers.end(); it++) {
|
||||
delete it->second;
|
||||
}
|
||||
o_handlers.clear();
|
||||
}
|
||||
|
||||
|
||||
/* Get handler/filter object for given mime type: */
|
||||
Dijon::Filter *getMimeHandler(const string &mtype, RclConfig *cfg,
|
||||
bool filtertypes)
|
||||
|
||||
@@ -114,6 +114,11 @@ extern Dijon::Filter *getMimeHandler(const std::string &mtyp, RclConfig *cfg,
|
||||
/// Free up filter for reuse (you can also delete it)
|
||||
extern void returnMimeHandler(Dijon::Filter *);
|
||||
|
||||
/// Clean up cache at the end of an indexing pass. For people who use
|
||||
/// the GUI to index: avoid all those filter processes forever hanging
|
||||
/// off recoll.
|
||||
extern void clearMimeHandlerCache();
|
||||
|
||||
/// Can this mime type be interned ?
|
||||
extern bool canIntern(const std::string mimetype, RclConfig *cfg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user