{"action":"created","issue":{"url":"https://api.github.com/repos/maps4print/azul/issues/24","repository_url":"https://api.github.com/repos/maps4print/azul","labels_url":"https://api.github.com/repos/maps4print/azul/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/maps4print/azul/issues/24/comments","events_url":"https://api.github.com/repos/maps4print/azul/issues/24/events","html_url":"https://github.com/maps4print/azul/issues/24","id":369107145,"node_id":"MDU6SXNzdWUzNjkxMDcxNDU=","number":24,"title":"Not closing when try to exit in example \"async\"","user":{"login":"Escapingbug","id":19388242,"node_id":"MDQ6VXNlcjE5Mzg4MjQy","avatar_url":"https://avatars3.githubusercontent.com/u/19388242?v=4","gravatar_id":"","url":"https://api.github.com/users/Escapingbug","html_url":"https://github.com/Escapingbug","followers_url":"https://api.github.com/users/Escapingbug/followers","following_url":"https://api.github.com/users/Escapingbug/following{/other_user}","gists_url":"https://api.github.com/users/Escapingbug/gists{/gist_id}","starred_url":"https://api.github.com/users/Escapingbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Escapingbug/subscriptions","organizations_url":"https://api.github.com/users/Escapingbug/orgs","repos_url":"https://api.github.com/users/Escapingbug/repos","events_url":"https://api.github.com/users/Escapingbug/events{/privacy}","received_events_url":"https://api.github.com/users/Escapingbug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-10-11T12:53:52Z","updated_at":"2018-10-16T06:44:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Description\r\n<!--\r\nPlease provide a detailed description of the behavior you're seeing or the behavior\r\nyou'd like to see **below** this comment.\r\n-->\r\nIn the example program \"async\", when I started the 10 seconds countdown, and try to exit during this time, it just hold there.\r\n\r\nI did some debugging, seeing that is probably the tasks are waiting to exit. Maybe we should think about a method to interrupt or kill the thread nicely? Force to kill the thread may result in inconsistent states, but I think we really should provide a way to exit during task evaluating instead of just waiting for it to end.\r\n\r\n## Version / OS\r\n<!--\r\nRequired. Please fill out the following fields.\r\n-->\r\n\r\n* azul version: git version 2b9a791\r\n\r\n\r\n* Operating system: Manjaro linux\r\n\r\n\r\n* Windowing system (X11 or Wayland, Linux only): i3wm\r\n\r\n\r\n## Steps to Reproduce\r\n<!--\r\nList the steps to reproduce your issue **below** this comment\r\n-->\r\nRun the program, and starts the count down, and try exit.\r\n\r\n\r\n## Expected Behavior\r\nExit immediately\r\n\r\n## Actual Behavior\r\nStill waiting for 10 seconds countdown.\r\n\r\n## Additional Information\r\n<!--\r\nPlace any additional information, configuration, or data that might be necessary\r\nto reproduce the issue **below** this comment.\r\n\r\nIf you have screen shots or gifs that demonstrate the issue, please include them.\r\n-->\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/maps4print/azul/issues/comments/430119995","html_url":"https://github.com/maps4print/azul/issues/24#issuecomment-430119995","issue_url":"https://api.github.com/repos/maps4print/azul/issues/24","id":430119995,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDExOTk5NQ==","user":{"login":"Escapingbug","id":19388242,"node_id":"MDQ6VXNlcjE5Mzg4MjQy","avatar_url":"https://avatars3.githubusercontent.com/u/19388242?v=4","gravatar_id":"","url":"https://api.github.com/users/Escapingbug","html_url":"https://github.com/Escapingbug","followers_url":"https://api.github.com/users/Escapingbug/followers","following_url":"https://api.github.com/users/Escapingbug/following{/other_user}","gists_url":"https://api.github.com/users/Escapingbug/gists{/gist_id}","starred_url":"https://api.github.com/users/Escapingbug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Escapingbug/subscriptions","organizations_url":"https://api.github.com/users/Escapingbug/orgs","repos_url":"https://api.github.com/users/Escapingbug/repos","events_url":"https://api.github.com/users/Escapingbug/events{/privacy}","received_events_url":"https://api.github.com/users/Escapingbug/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T06:44:49Z","updated_at":"2018-10-16T06:44:49Z","author_association":"CONTRIBUTOR","body":">     1. Maybe better on a per-task basis? Do exit codes matter? Up to you\r\n> \r\n>     2. Is this necessary? Rust shouldn't crash after all, if there's an error, it should report it as a Result. Again, up to you\r\n\r\nAgreed.\r\n\r\nOne task may be slow and not critical while another may be fast but critical. So we still want to wait until critical one to finish but leaving the not critical ones exit immediately. And I also think there should be a way for user to change how we react on windows when a closing event is received. Like, one should be able to \"hold up\" windows, and prompt some \"waiting till _ to complete\" message till waiting for background tasks.\r\n\r\nAnd for the thread panicking stuff, it should just panic the whole application, because it represents an error instead of simple exception. That means, critical bugs that prevent the whole application to continue. For example, OOM. Then we really should not recover from these, or else, result should be returned."}}
{"actor":{"display_login":"Escapingbug"}}