23
23
use std:: fmt;
24
24
use std:: io:: { self , ErrorKind } ;
25
25
use std:: sync:: { Arc , Weak , RwLock } ;
26
- use std:: sync:: atomic:: { AtomicUsize , ATOMIC_USIZE_INIT , Ordering } ;
26
+ use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
27
27
use std:: time:: { Duration } ;
28
28
29
29
use futures:: { Future , Async } ;
@@ -38,9 +38,6 @@ mod io_token;
38
38
mod poll_evented;
39
39
pub use self :: poll_evented:: PollEvented ;
40
40
41
- /// Global counter used to assign unique IDs to reactor instances.
42
- static NEXT_LOOP_ID : AtomicUsize = ATOMIC_USIZE_INIT ;
43
-
44
41
/// The core reactor, or event loop.
45
42
///
46
43
/// The event loop is the main source of blocking in an application which drives
@@ -62,9 +59,6 @@ pub struct Core {
62
59
}
63
60
64
61
struct Inner {
65
- /// Unique identifier referencing this reactor.
66
- id : usize ,
67
-
68
62
/// The underlying system event queue.
69
63
io : mio:: Poll ,
70
64
@@ -79,7 +73,6 @@ struct Inner {
79
73
/// and will instead use and implicitly configured handle for your thread.
80
74
#[ derive( Clone ) ]
81
75
pub struct Handle {
82
- id : usize ,
83
76
inner : Weak < Inner > ,
84
77
}
85
78
@@ -123,7 +116,6 @@ impl Core {
123
116
_future_registration : future_pair. 0 ,
124
117
future_readiness : Arc :: new ( MySetReadiness ( future_pair. 1 ) ) ,
125
118
inner : Arc :: new ( Inner {
126
- id : NEXT_LOOP_ID . fetch_add ( 1 , Ordering :: Relaxed ) ,
127
119
io : io,
128
120
io_dispatch : RwLock :: new ( Slab :: with_capacity ( 1 ) ) ,
129
121
} ) ,
@@ -138,7 +130,6 @@ impl Core {
138
130
/// to bind them to this event loop.
139
131
pub fn handle ( & self ) -> Handle {
140
132
Handle {
141
- id : self . inner . id ,
142
133
inner : Arc :: downgrade ( & self . inner ) ,
143
134
}
144
135
}
0 commit comments