File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,19 @@ use crate::{
5555/// Since multiple [`Evdev`]s can refer to the same file handle, none of the methods require a
5656/// mutable reference, again mirroring the API of [`TcpStream`].
5757///
58+ /// # Blocking Drop
59+ ///
60+ /// When an [`Evdev`] is dropped, the underlying file descriptor is closed, which can block for a
61+ /// considerable amount of time (50-100 ms).
62+ /// This is happening in the evdev subsystem in the kernel, so there is not much userspace can do
63+ /// about that.
64+ ///
65+ /// If this delay is a problem for your application, there are several options:
66+ ///
67+ /// - Send the [`Evdev`] to another thread and drop it there.
68+ /// - [`mem::forget`][std::mem::forget] the [`Evdev`] and leak the file descriptor, if that leak is
69+ /// acceptable for your application.
70+ ///
5871/// # Device Lifecycle
5972///
6073/// (the observations here were made on Linux, the behavior on FreeBSD may differ a bit)
Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ impl Effect<'_> {
410410 /// By default, effects use ID `-1`, which is appropriate when uploading a new effect to a
411411 /// device (the input subsystem will allocate an ID for the effect).
412412 ///
413- /// The ID can be set to a existing [`EffectId`] in order to reconfigure an already uploaded
413+ /// The ID can be set to an existing [`EffectId`] in order to reconfigure an already uploaded
414414 /// effect.
415415 #[ inline]
416416 pub fn with_id ( mut self , id : EffectId ) -> Self {
You can’t perform that action at this time.
0 commit comments