runtime: create reactor per worker (#660)

This commit is contained in:
Stjepan Glavina
2018-10-02 18:19:27 -07:00
committed by Carl Lerche
parent 886511c0a6
commit d35d0518f5
6 changed files with 60 additions and 52 deletions
+8
View File
@@ -892,4 +892,12 @@ impl WorkerId {
pub(crate) fn new(idx: usize) -> WorkerId {
WorkerId(idx)
}
/// Returns this identifier represented as an integer.
///
/// Worker identifiers in a single thread pool are guaranteed to correspond to integers in the
/// range `0..pool_size`.
pub fn to_usize(&self) -> usize {
self.0
}
}