Function dont_disappear::press_close
source · pub fn press_close()
Expand description
Press close only with window manager or Ctrl-c.
The program just stops and waits to be killed by pressing close only with window manager or Ctrl-c. The thread is parked so it does not use CPU. Add
extern crate dont_disappear;
to the top of your file and
dont_disappear::press_close();
to where your program ends