This commit is contained in:
Harrison G 2015-08-02 16:55:42 -04:00
parent f1c26c59f1
commit 49c5408e65
8 changed files with 67 additions and 40 deletions

View file

@ -121,6 +121,14 @@ impl<'a> GlobalRef<'a> {
}
}
/// Get the worker's id.
pub fn get_worker_id(&self) -> Option<WorkerId> {
match *self {
GlobalRef::Window(_) => None,
GlobalRef::Worker(ref worker) => worker.get_worker_id(),
}
}
/// Get next worker id.
pub fn get_next_worker_id(&self) -> WorkerId {
match *self {