fn enqueue_runnable(&self, key: TaskKey, check_absent: bool) {
        if self.which_buffer.get() { //if now 1 is executed then add to 0 and vice versa.
            if check_absent && self.runnable.0.borrow().contains(&key) { return; }
            self.runnable.0.borrow_mut().push_back(key);
        } else {
            if check_absent && self.runnable.1.borrow().contains(&key) { return; }
            self.runnable.1.borrow_mut().push_back(key);
        }
    }
//safe to call from inside task
safe to call from inside task
safe to call from inside task
fn enqueue_runnable(&self, key: TaskKey, check_absent: bool) {
        if self.which_buffer.get() { //if now 1 is executed then add to 0 and vice versa.
            if check_absent && self.runnable.0.borrow().contains(&key) { return; }
            self.runnable.0.borrow_mut().push_back(key);
        } else {
            if check_absent && self.runnable.1.borrow().contains(&key) { return; }
            self.runnable.1.borrow_mut().push_back(key);
        }
    }
fn enqueue_runnable ( & self , key : TaskKey , check_absent : bool ) { if self . which_buffer . get ( ) { //if now 1 is executed then add to 0 and vice versa. if check_absent && self . runnable . 0 . borrow ( ) . contains ( & key ) { return ; } self . runnable . 0 . borrow_mut ( ) . push_back ( key ) ; } else { if check_absent && self . runnable . 1 . borrow ( ) . contains ( & key ) { return ; } self . runnable . 1 . borrow_mut ( ) . push_back ( key ) ; } }
safe to call from inside task
safe to call from inside task
&self
key
TaskKey
check_absent
bool
&self
key
TaskKey
check_absent
bool