Fantastic! I didn't know about "plumbers" at all. Thanks a lot!
Best, Erich On Tue, 31 Jan 2017 06:33:03 -0700 Matthew Flatt <mfl...@cs.utah.edu> wrote: > I think you probably want `plumber-add-flush-handle!`: > > http://docs.racket-lang.org/reference/plumbers.html > > At Tue, 31 Jan 2017 13:23:03 +0000, Erich Rast wrote: > > Hi, > > > > I was wondering what's the best way to ensure that threads end > > when a gui application is shut down, which synchronization > > mechanism I should use and which kind of program terminations would > > be handled gracefully by this. > > > > I'm planning on delaying certain sqlite transactions in threads, > > since doing them immediately when the user interacts with the GUI > > does not work well. AFAIK, sqlite is ACID-compliant, so db > > consistency should not be a concern, but I still need to figure out > > which mechanism to use for ensuring that the main thread waits for > > the remaining threads to finish, and under which conditions it will > > fail. I've read about custodians and application-quit-handler. > > Should I use the latter? Which timeout is "safe" on which platform? > > (E.g. Windows waits for applications to finish before it shuts > > down, but not indefinitely, and how about Linux and OSX?) > > > > Related to that, does application-quit-handler capture signals on > > Linux, and if so, which ones, and/or is there a way to install > > signal handlers in Racket? > > > > Sorry for posing so many questions at once. I just wonder what the > > practice is for this common scenario. Thanks in advance for any > > replies! > > > > Best, > > > > Erich > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Racket Users" group. > > To unsubscribe from this group and stop receiving emails from it, > > send an email to racket-users+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.