KIO::mimetype sync call in DocumentController::openDocumentInternal hazardous

Milian Wolff mail at
Mon Sep 27 09:11:58 UTC 2010

On Sunday, 26. September 2010 19:20:40 Niko Sams wrote:
> > So how can we fix this? Can someone explain how I could make
> > openDocumentInternal reentrant? Just by coping with the case the
> > assertion currently prevents? I sadly don't see a way to use the safe
> > async KJob api here :-S
> Can you add a callback function that asynchronously gets called when the
> job finished and continues then with openDocument?
> Yes, that would make the code quite complicated.

No, not possible. Think about it: Essentially what you explain here is whats 
already happening in the sync call of job->exec(). No need to duplicate that 
code, as it will have the same problems (or block the whole thread which is of 
course a nogo as well).
Milian Wolff
mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the KDevelop-devel mailing list