Currently, the pattern is for the application to count how many windows are open. If not done exactly right we get zombie processes. Behaviors of the Application interfaces must return a Window that can be counted by Nasin, which will then call tomo.Stop once no windows are open.
Currently, the pattern is for the application to count how many windows are open. If not done exactly right we get zombie processes. Behaviors of the Application interfaces must return a Window that can be counted by Nasin, which will then call tomo.Stop once no windows are open.
There needs to be some sort of nasin.Manage function that takes in a window, and will return a cookie that unmanages it. The function will increment the window counter when called, and decrement it when the window is closed, then checking if it is zero to call tomo.Stop if need be.
Perhaps instead of accepting a window, it could accept a Manageable interface with an OnClose behavior. This would allow applications to do things like keep a background service running to receive notifications or something like that.
There needs to be some sort of nasin.Manage function that takes in a window, and will return a cookie that unmanages it. The function will increment the window counter when called, and decrement it when the window is closed, then checking if it is zero to call tomo.Stop if need be.
Perhaps instead of accepting a window, it could accept a Manageable interface with an OnClose behavior. This would allow applications to do things like keep a background service running to receive notifications or something like that.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently, the pattern is for the application to count how many windows are open. If not done exactly right we get zombie processes. Behaviors of the Application interfaces must return a Window that can be counted by Nasin, which will then call tomo.Stop once no windows are open.
7da00e990eThe current solution is actually bad. What if the application wants to open another window (like middle clicking in a file manager)?
There needs to be some sort of nasin.Manage function that takes in a window, and will return a cookie that unmanages it. The function will increment the window counter when called, and decrement it when the window is closed, then checking if it is zero to call tomo.Stop if need be.
Perhaps instead of accepting a window, it could accept a Manageable interface with an OnClose behavior. This would allow applications to do things like keep a background service running to receive notifications or something like that.
On second thought, the Manageable interface would be a very bad idea. It would be very bug prone in terms of goroutines.