You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That actually looks really weird. All the signal structures in tokio::signal::windows:: are different. Still, all of them implement the same methods and have one field of the same type. Why was it possible to create a common type for signals on unix (tokio::signal::unix::Signal), but not on windows? Ok, maybe at least a common trait for recv and poll_recv methods?..
Is using Box<dyn Any> and then downcasting it to all the different signal types really the architecturally best way to use a common logic to handle different termination signals?..
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
That actually looks really weird. All the signal structures in
tokio::signal::windows::
are different. Still, all of them implement the same methods and have one field of the same type. Why was it possible to create a common type for signals on unix (tokio::signal::unix::Signal
), but not on windows? Ok, maybe at least a common trait forrecv
andpoll_recv
methods?..Is using
Box<dyn Any>
and then downcasting it to all the different signal types really the architecturally best way to use a common logic to handle different termination signals?..Beta Was this translation helpful? Give feedback.
All reactions