| 1 | # Change Log |
| 2 | |
| 3 | ## Unreleased |
| 4 | |
| 5 | ## 0.10.4 -- 2022-12-05 |
| 6 | |
| 7 | #### Bugfixes |
| 8 | |
| 9 | - Fixed a crash due to double borrow when handling pre/post run hooks |
| 10 | |
| 11 | ## 0.10.2 -- 2022-11-08 |
| 12 | |
| 13 | #### Bugfixes |
| 14 | |
| 15 | - The return value of `LoopHandle::insert_idle` no longer borrows the `LoopHandle`. |
| 16 | |
| 17 | ## 0.10.1 -- 2022-06-20 |
| 18 | |
| 19 | #### Additions |
| 20 | |
| 21 | - The `Channel` now has proxy methods for `Receiver::recv` and `Receiver::try_recv` |
| 22 | - Enable support for `target_os = "android"` |
| 23 | |
| 24 | ## 0.10.0 -- 2022-05-06 |
| 25 | |
| 26 | - **Breaking:** Calloop's internal storage is now backed by a `slotmap`. As a result the |
| 27 | `RegistrationToken` is now `Copy+Clone`, and the low-level registration API of `Poll` is |
| 28 | altered in a breaking way. MSRV is bumped to 1.49. |
| 29 | - **Breaking:** `generic::Fd` adapter is removed, as since that rust version `RawFd` implements |
| 30 | `AsRawFd`, allowing it to be used directly in `Generic`. |
| 31 | - **Breaking:** The `EventSource` trait has a new associated type `Error`. This determines the type |
| 32 | of the error variant returned by `EventSource::process_events()`. It must be convertible into |
| 33 | `Box<dyn std::error::Error + Sync + Send>`. |
| 34 | - **Breaking:** All library-provided event sources now have their own error types for the |
| 35 | associated `Error` type on the `EventSource` trait. |
| 36 | - **Breaking:** Many API functions now use Calloop's own error type (`calloop::Error`) instead of |
| 37 | `std::io::Error` as the error variants of their returned results. |
| 38 | - **Breaking:** The `Timer` event source has been completely reworked and is now directly driven by |
| 39 | calloop polling mechanism instead of a background thread. Timer multiplexing is now handled by |
| 40 | creating multiple `Timer`s, and self-repeating timers is handled by the return value of the |
| 41 | associated event callback. |
| 42 | - **Breaking:** The minimum supported Rust version is now 1.53.0 |
| 43 | - Introduce `EventLoop::try_new_high_precision()` for sub-millisecond accuracy in the event loop |
| 44 | - The `PingSource` event source now uses an `eventfd` instead of a pipe on Linux. |
| 45 | |
| 46 | ## 0.9.2 -- 2021-12-27 |
| 47 | |
| 48 | #### Additions |
| 49 | |
| 50 | - Introduce the methods `pre_run()` and `post_run()` to `EventSource`, allowing event sources |
| 51 | to do preparations before entering a run/dispatch session, and cleanup afterwards. They have default |
| 52 | implementations doing nothing. |
| 53 | |
| 54 | ## 0.9.1 -- 2021-08-10 |
| 55 | |
| 56 | - Update `nix` dependency to 0.22 |
| 57 | |
| 58 | ## 0.9.0 -- 2021-06-29 |
| 59 | |
| 60 | #### Breaking changes |
| 61 | |
| 62 | - MSRV is now 1.41 |
| 63 | - The `futures` module now has a proper error type for `Scheduler::schedule()` |
| 64 | - The return type of `EventSource::process_events()` is now `io::Result<PostAction>` allowing |
| 65 | the sources to directly request the event loop to reregister/disable/destroy them. |
| 66 | - The `Token` creation mechanism is now driven by a `TokenFactory`, that |
| 67 | dynamically generates new unique token for sub-sources. Following for this |
| 68 | if you create a new event source that is not built by composing the ones |
| 69 | provided by calloop, you need to check if the `Token` provided to |
| 70 | `process_events` is the same as the one you created when (re)registering |
| 71 | your source. If you delegate `process_events` to a sub-source, you no longer |
| 72 | need to check the `sub_id` before, instead the source you are delegating to |
| 73 | is responsible to to this check. |
| 74 | |
| 75 | #### Bugfixes |
| 76 | |
| 77 | - Cancelling a timeout no longer prevents later timeouts from firing. |
| 78 | |
| 79 | ## 0.8.0 -- 2021-05-30 |
| 80 | |
| 81 | #### Breaking changes |
| 82 | |
| 83 | - The `Dispatcher` type no longer has the closure type within its type parameters, |
| 84 | but instead now has an explicit lifetime parameter, as well as the source type `S` |
| 85 | and the event loop `Data` type. This allows the type to be explicitly named and |
| 86 | stored into an other struct. |
| 87 | |
| 88 | #### Additions |
| 89 | |
| 90 | - `Token` now has a method `with_sub_id()` that returns a copy of the token |
| 91 | but with the given `sub_id`. |
| 92 | |
| 93 | ## 0.7.2 -- 2021-02-09 |
| 94 | |
| 95 | #### Changes |
| 96 | |
| 97 | - `EventLoop::run()` now accepts `Into<Option<Duration>>`, like `EventLoop::dispatch()` |
| 98 | |
| 99 | #### Bugfixes |
| 100 | |
| 101 | - The `Ping` event source now automatically disables itself when its sending end is |
| 102 | dropped, preventing to always be considered readable (which caused a busy-loop). |
| 103 | This also fixes a similar behavior of `Executor` and `Channel`, which use `Ping` |
| 104 | internally. |
| 105 | |
| 106 | ## 0.7.0 -- 2020-10-13 |
| 107 | |
| 108 | #### Breaking Changes |
| 109 | |
| 110 | - The return type for `LoopHandle::insert_source` was renamed as |
| 111 | `RegistrationToken` and can be used in `{enable,disable,update,remove,kill}` |
| 112 | just like before. |
| 113 | - Allow non-`'static` event sources and callbacks, so they can hold references |
| 114 | to other values. |
| 115 | - `LoopHandle::with_source` was removed. To achieve the same behaviour, use a |
| 116 | `Dispatcher` and register it via the `LoopHandle::register_dispatcher`. The |
| 117 | `EventSource` will be available using `Dispatcher::as_source_{ref,mut}`. |
| 118 | - `LoopHandle::remove` doesn't return the event source any more. To achieve |
| 119 | the same behaviour, use a `Dispatcher` and register it via the |
| 120 | `LoopHandle::register_dispatcher`. After removing the `EventSource` with |
| 121 | `LoopHandle::remove`, you will be able to call |
| 122 | `Dispatcher::into_source_inner` to get ownership of the `EventSource`. |
| 123 | - `LoopHandle::register_dispatcher` can be used in place of |
| 124 | `LoopHandle::insert_source` when the source needs to be accessed after |
| 125 | its insertion in the loop. |
| 126 | - `Interest` is changed into a struct to allow empty interest queries |
| 127 | |
| 128 | #### Additions |
| 129 | |
| 130 | - Introduce a futures executor as a new event source, behind the `executor` cargo |
| 131 | feature. |
| 132 | - Introduce the `LoopHandle::adapt_io` method for creating `Async<F>` adapters to |
| 133 | adapt IO objects for async use, powered by the event loop. |
| 134 | |
| 135 | ## 0.6.5 -- 2020-10-07 |
| 136 | |
| 137 | #### Fixes |
| 138 | |
| 139 | - Channel now signals readinnes after the event has actually been sent, fixing a race |
| 140 | condition where the event loop would try to read the message before it has been |
| 141 | written. |
| 142 | |
| 143 | ## 0.6.4 -- 2020-08-30 |
| 144 | |
| 145 | #### Fixes |
| 146 | |
| 147 | - Fix double borrow during dispatch when some event source is getting removed |
| 148 | |
| 149 | ## 0.6.3 -- 2020-08-27 |
| 150 | |
| 151 | #### Aditions |
| 152 | |
| 153 | - Add support for `openbsd`, `netbsd`, and `dragonfly`. |
| 154 | - `InsertError<E>` now implements `std::error::Error`. |
| 155 | |
| 156 | #### Changes |
| 157 | |
| 158 | - Allow non-`'static` dispatch `Data`. `Data` is passed as an argument to the |
| 159 | `callback`s while dispatching. This change allows defining `Data` types which |
| 160 | can hold references to other values. |
| 161 | - `dispatch` now will retry on `EINTR`. |
| 162 | |
| 163 | ## 0.6.2 -- 2020-04-23 |
| 164 | |
| 165 | - Update the README and keywords for crates.io |
| 166 | |
| 167 | ## 0.6.1 -- 2020-04-22 |
| 168 | |
| 169 | - Introduce `LoopHandle::kill` to allow dropping a source from within its callback |
| 170 | |
| 171 | ## 0.6.0 -- 2020-04-22 |
| 172 | |
| 173 | - Drop the `mio` dependency |
| 174 | - **Breaking Change**: Significantly rework the `calloop` API, notably: |
| 175 | - Event sources are now owned by the `EventLoop` |
| 176 | - Users can now again set the polling mode (Level/Edge/OneShot) |
| 177 | - Introduce the `Ping` event source |
| 178 | |
| 179 | ## 0.5.2 -- 2020-04-14 |
| 180 | |
| 181 | - `channel::Channel` is now `Send`, allowing you to create a channel in one thread and sending |
| 182 | its receiving end to an other thread for event loop insertion. |
| 183 | |
| 184 | ## 0.5.1 -- 2020-03-14 |
| 185 | |
| 186 | - Update `mio` to `0.7` |
| 187 | |
| 188 | ## 0.5.0 -- 2020-02-07 |
| 189 | |
| 190 | - Update to 2018 edition |
| 191 | - Update `nix` dependency to `0.17` |
| 192 | - **Breaking** Update `mio` dependency to `0.7.0-alpha.1`. The API of `calloop` for custom |
| 193 | event sources significantly changed, and the channel and timer event sources are now |
| 194 | implemented in `calloop` rather than pulled from `mio-extras`. |
| 195 | |
| 196 | ## 0.4.4 -- 2019-06-13 |
| 197 | |
| 198 | - Update `nix` dependency to `0.14` |
| 199 | |
| 200 | ## 0.4.3 -- 2019-02-17 |
| 201 | |
| 202 | - Update `mio` dependency |
| 203 | - Update `nix` dependency |
| 204 | |
| 205 | ## 0.4.2 -- 2018-11-15 |
| 206 | |
| 207 | - Implement `Debug` for `InsertError`. |
| 208 | |
| 209 | ## 0.4.1 -- 2018-11-14 |
| 210 | |
| 211 | - Disable the `sources::signal` module on FreeBSD so that the library can be built on this |
| 212 | platform. |
| 213 | |
| 214 | ## 0.4.0 -- 2018-11-04 |
| 215 | |
| 216 | - **Breaking** Use `mio-extras` instead of `mio-more` which is not maintained. |
| 217 | - **Breaking** Reexport `mio` rather than selectively re-exporting some of its types. |
| 218 | - Add methods to `Generic` to retrive the inner `Rc` and construct it from an `Rc` |
| 219 | - **Breaking** `LoopHandle::insert_source` now allows to retrieve the source on error. |
| 220 | |
| 221 | ## 0.3.2 -- 2018-09-25 |
| 222 | |
| 223 | - Fix the contents of `EventedRawFd` which was erroneously not public. |
| 224 | |
| 225 | ## 0.3.1 -- 2018-09-25 |
| 226 | |
| 227 | - introduce `EventedRawFd` as a special case for the `Generic` event source, for when |
| 228 | you really have to manipulate raw fds |
| 229 | - Don't panic when the removal of an event source trigger the removal of an other one |
| 230 | |
| 231 | ## 0.3.0 -- 2018-09-10 |
| 232 | |
| 233 | - Fixed a bug where inserting an event source from within a callback caused a panic. |
| 234 | - **[breaking]** Erase the `Data` type parameter from `Source` and `Idle`, for |
| 235 | improved ergonomics. |
| 236 | |
| 237 | ## 0.2.2 -- 2018-09-10 |
| 238 | |
| 239 | - Introduce an `EventLoop::run` method, as well as the `LoopSignal` handle allowing to |
| 240 | wakeup or stop the event loop from anywhere. |
| 241 | |
| 242 | ## 0.2.1 -- 2018-09-01 |
| 243 | |
| 244 | - Use `FnOnce` for insertion in idle callbacks. |
| 245 | |
| 246 | ## 0.2.0 -- 2018-08-30 |
| 247 | |
| 248 | - **[breaking]** Add a `&mut shared_data` argument to `EventLoop::dispatch(..)` to share data |
| 249 | between callbacks. |
| 250 | |
| 251 | ## 0.1.1 -- 2018-08-29 |
| 252 | |
| 253 | - `Generic` event source for wrapping arbitrary `Evented` types |
| 254 | - timer event sources |
| 255 | - UNIX signal event sources |
| 256 | - channel event sources |
| 257 | |
| 258 | ## 0.1.0 -- 2018-08-24 |
| 259 | |
| 260 | Initial release |