Comment 182 for bug 1512120

Revision history for this message
In , Rocketx86 (rocketx86) wrote :

Created attachment 6779
Handle folder change events with file info synchronization

Here's the latest set of changes that I have been testing which handle folder change events and synchronize updates to file info by multiple threads.

The patch contains the following changes to address the problems:

1. The file monitor no longer watches for move / rename events. (Harald's patch)
thunar_file_monitor no longer handles G_FILE_MONITOR_EVENT_MOVED.
thunar_file_monitor_moved has been renamed to thunar_file_renamed which is only called by thunar_file_rename.

2. The folder monitor now watches for move events using the newer G_FILE_MONITOR_WATCH_MOVES flag.
thunar_file_monitor no longer handles G_FILE_MONITOR_EVENT_MOVED.
thunar_file_monitor now handles G_FILE_MONITOR_EVENT_CREATED, G_FILE_MONITOR_EVENT_MOVED_IN, G_FILE_MONITOR_EVENT_DELETED, G_FILE_MONITOR_EVENT_MOVED_OUT and G_FILE_MONITOR_EVENT_RENAMED events.

3. Added thread synchronization around critical sections clearing and reloading file info by introducing locking on file_info_mutex in thunar_file_get_async_finish, thunar_file_load and thunar_file_get_with_info.