mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-17 00:00:11 +02:00
signal: Update the windows implementation to work with tokio
BREAKING CHANGE `ctrl_c` now takes a `tokio_reactor::Handle`
This commit is contained in:
committed by
Carl Lerche
parent
2848df9b6c
commit
e97e8cb7fe
+1
-1
@@ -19,7 +19,7 @@ fn main() {
|
||||
// the `flatten_stream()` convenience method lazily defers that
|
||||
// initialisation, allowing us to use it 'as if' it is already the
|
||||
// stream we want, reducing boilerplate Future-handling.
|
||||
let endless_stream = tokio_signal::ctrl_c(&core.handle()).flatten_stream();
|
||||
let endless_stream = tokio_signal::ctrl_c(&core.handle().new_tokio_handle()).flatten_stream();
|
||||
// don't keep going forever: convert the endless stream to a bounded one.
|
||||
let limited_stream = endless_stream.take(STOP_AFTER);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user