On Mon, 24 May 2010 20:32:33 +1000 Lex Trotman elextr@gmail.com wrote:
On 24 May 2010 18:18, Dimitar Zhekov hamster@mbox.contact.bg wrote:
If we want the filetype save to be consistent with "Edit -> Preferences" and "Project -> Properties", I think the commands should be saved on "Build -> Set build commands", for both main and secondary sessions. And since there is nothing else to be saved, main_quit() will not need to do filetypes_save_commands(), hence no race.
Sounds like a plan.
Here it is then.
(BTW, closing 2+ Wordpad-s works just fine for us - the save prompts appear one by one. Win~1 waits for a program to close before asking the next program to quit.)
But what happens when there are no unsaved files to use the user as the serialising critical section :)
The save prompts one-by-one means that Win~1 sends WM_QUIT to foo.exe, waits for the message to be processed (i.e. the foo.exe to be closed), and only then sends WM_QUIT to bar.exe. That's fine even if there are no unsaved files. I only needed the prompts as a visual indicator of the message processing, not as serializer.