Comment 239 for bug 1512120

The hangs may be caused by the multithreading bug from my previous comment.

The problem is this: there is both a folder monitor and a file monitor. Usually, the file monitor is registered before the folder monitor. If that happens, when a file is renamed, the file monitor gets called and the folder monitor gets temporarily disconnected (this causes thunar_folder_monitor not to run later).

But, sometimes, when we're out of luck, because of the multithreading issues, the file monitor is not registered (or registered for the wrong (already renamed?) filename). In that case, the folder monitor will handle the signal.

When that happens, this assertion always fails in thunar_folder_finished - this causes the hang:
_thunar_return_if_fail (folder->content_type_idle_id == 0);