Comment 257 for bug 1512120

There seems to be a problem with the patch for this bug - namely that it now deadlocks instead of crashing.

The problem appears to be as follows:

1. A file in that directory gets renamed.
2. G_FILE_MONITOR_EVENT_MOVED happens on thread A.
3. The mutex gets locked.
4. The thumbnail associated with the file gets renamed.
5. G_FILE_MONITOR_EVENT_MOVED happens for the thumbnail on thread B.
6. Thread B waits on the mutex to unlock.
7. Thread A won't unlock the mutex until thread B finished.

This all seems to be a result of:

  thunar_file_move_thumbnail_cache_file (event_path, other_path);

now being inside the mutex. The previous crash was likely caused by a similar chain of events, eg check out this bug report which specifically mentions move_thumbnail:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800723;msg=91