summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFabrice Popineau <fabrice.popineau@gmail.com>2016-03-19 14:44:53 +0200
committerEli Zaretskii <eliz@gnu.org>2016-03-19 14:44:53 +0200
commit326fff41fa9f674d80be00b5c97c44f8043bbace (patch)
tree15f5e2fb315130ce923970d16a96c8e951914857 /lib
parent2fbdb1bb4c878f8ae17bd69d1b4ff51c47497e41 (diff)
downloademacs-326fff41fa9f674d80be00b5c97c44f8043bbace.tar.gz
Improve w32notify notifications
* src/w32notify.c (DIRWATCH_BUFFER_SIZE): New macro. (struct notification): 'terminate' is now a HANDLE. (send_notifications): Argument is now a pointer to a notification. Don't loop waiting for the notification to be acknowledged by the main thread; instead, just add the notification to the linked list of notifications waiting to be acknowledged. (watch_end): Don't close the directory handle. (watch_completion): Allocate a new notification structure to be added to the notifications set. Call ReadDirectoryChangesW immediately after adding the new notification, and before sending a message to the main thread about them. (watch_worker): Don't loop calling ReadDirectoryChangesW; instead, call it just once -- it will be called again in watch_completion. Loop waiting for the main thread's indication to terminate. (start_watching): Create the event to be used to indicate to the worker thread that its should terminate. (remove_watch): Indicate to the worker thread that it should terminate. * src/w32term.c (queue_notifications): Loop over all the notifications in the linked list, processing all of them in one go. * src/w32inevt.c (handle_file_notifications): Loop over all the notifications in the linked list. * src/w32xfns.c (init_crit): Initialize the linked list of file notifications. (delete_crit): Free the linked list of file notifications, including any unprocessed notifications left in it. * src/w32term.h (struct notifications_se): New struct. * test/lisp/filenotify-tests.el (file-notify-test02-events) (file-notify-test05-dir-validity): Add read-event calls to facilitate event recognition by the main thread in batch mode.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions