window is needed to call callback with appropriate window in thread when we have smth to show.
waiting is shared between `in` and `out` threads. So `out` thread can put request when its made by user
im not sure why are you asking this questions :)