Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions timely/src/dataflow/scopes/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ where
fn new_identifier(&mut self) -> usize {
self.parent.new_identifier()
}
fn peek_identifier(&self) -> usize {
self.parent.peek_identifier()
}
fn log_register(&self) -> ::std::cell::RefMut<crate::logging_core::Registry<crate::logging::WorkerIdentifier>> {
self.parent.log_register()
}
Expand Down
8 changes: 8 additions & 0 deletions timely/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ pub trait AsWorker : Scheduler {

/// Allocates a new worker-unique identifier.
fn new_identifier(&mut self) -> usize;
/// The next worker-unique identifier to be allocated.
fn peek_identifier(&self) -> usize;
/// Provides access to named logging streams.
fn log_register(&self) -> ::std::cell::RefMut<crate::logging_core::Registry<crate::logging::WorkerIdentifier>>;
/// Provides access to the timely logging stream.
Expand Down Expand Up @@ -247,6 +249,7 @@ impl<A: Allocate> AsWorker for Worker<A> {
}

fn new_identifier(&mut self) -> usize { self.new_identifier() }
fn peek_identifier(&self) -> usize { self.peek_identifier() }
fn log_register(&self) -> RefMut<crate::logging_core::Registry<crate::logging::WorkerIdentifier>> {
self.log_register()
}
Expand Down Expand Up @@ -526,6 +529,11 @@ impl<A: Allocate> Worker<A> {
*self.identifiers.borrow() - 1
}

/// The next worker-unique identifier to be allocated.
pub fn peek_identifier(&self) -> usize {
*self.identifiers.borrow()
}

/// Access to named loggers.
///
/// # Examples
Expand Down