-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A controllable way to add timeouts #181
Comments
The current way this is implemented is not ideal. You're thread solution is basically state-of-the-art of what is possible right now I'm afraid. We could add a mechanism that uses channels to notify-rust, but ultimately that would also require a thread. Alternatively there is an experimental async version on a branch somewhere, but that's not done yet unfortunately. |
The only thing I really miss here is an ability to close the notification on timeout. But for now, I can live without it. |
but that should be the default behaviour of |
If I wanted to close a notification from my "external timeout" thread, I would need a handler, which is unavailable because it's being used by The whole reason why I'm using the external timeout is that I wasn't able to reliable set up |
Do you need the |
Yep, I need it. Otherwise, notifications are being closed pretty quickly with random timeouts (and using |
I found that on Ubuntu 20.04 I can't really control timeouts and to control timeouts better I have to use
Urgency::Critical
and thenwait_for_action
.I also found, that on the same system, a notification sometimes could be sent but not being displayed, so my program stuck waiting for an action on a notification that was never displayed.
Both
wait_for_action
andon_close
are blocking (means the issue is related a bit to #36), and also I can't cloneNotificationHandler
.My partial solution to those issues it's not a perfect one, since while I introduced an external timeout, I can't close a notification after my process times out.
My attempt to ask on Stackoverflow didn't give any results apart from the solution I was able to find myself.
Any thoughts?
The text was updated successfully, but these errors were encountered: