pub fn push_safe(&mut self, fuzzy_info: StateInfo) -> bool {
        if !self.active() {
            return false
        }
        let same_kind = self.states
            .iter()
            .filter(|&(_, ref state)| (state.id.clone() & fuzzy_info.id.clone()))
            .count();

        // forcing at least 1 object of its kind in queue is not necessary what we want, limit config expresivness
        if self.states.len() > self.cfg.max_queue_size {
            return false//0 != same_kind
        }

        //here we want to FOLD and check siblings count ( ratio-% per object!! )
        //pay attention that we are interested only in activated ones ?
        //or maybe double activation, and final activation after intialization ?
        //
        //ok seems strict check on all siblings is preferable!!
       
        // well rust, overflows are handled, kind of overkill geting here overlow checks - implmenting fuzzer not OS
        if same_kind * self.cfg.ratio > self.cfg.max_queue_size * 1 {
            return false
        }

        if self.states.contains_key(&thread::current().id()) {
            panic!("trying to insert from same thread twice++ -> {}", fuzzy_info.name);
        }

        self.states.insert(thread::current().id(), fuzzy_info);
        true
    }
/// we fuzzing only one state in one thread!
we fuzzing only one state in one thread!
we fuzzing only one state in one thread!
pub fn push_safe(&mut self, fuzzy_info: StateInfo) -> bool {
        if !self.active() {
            return false
        }
        let same_kind = self.states
            .iter()
            .filter(|&(_, ref state)| (state.id.clone() & fuzzy_info.id.clone()))
            .count();
        // forcing at least 1 object of its kind in queue is not necessary what we want, limit config expresivness
        if self.states.len() > self.cfg.max_queue_size {
            return false//0 != same_kind
        }
        //here we want to FOLD and check siblings count ( ratio-% per object!! )
        //pay attention that we are interested only in activated ones ?
        //or maybe double activation, and final activation after intialization ?
        //
        //ok seems strict check on all siblings is preferable!!
        // well rust, overflows are handled, kind of overkill geting here overlow checks - implmenting fuzzer not OS
        if same_kind * self.cfg.ratio > self.cfg.max_queue_size * 1 {
            return false
        }
        if self.states.contains_key(&thread::current().id()) {
            panic!("trying to insert from same thread twice++ -> {}", fuzzy_info.name);
        }
        self.states.insert(thread::current().id(), fuzzy_info);
        true
    }
pub fn push_safe ( & mut self , fuzzy_info : StateInfo ) -> bool { if ! self . active ( ) { return false } let same_kind = self . states . iter ( ) . filter ( | & ( _ , ref state ) | ( state . id . clone ( ) & fuzzy_info . id . clone ( ) ) ) . count ( ) ; // forcing at least 1 object of its kind in queue is not necessary what we want, limit config expresivness if self . states . len ( ) > self . cfg . max_queue_size { return false //0 != same_kind } //here we want to FOLD and check siblings count ( ratio-% per object!! ) //pay attention that we are interested only in activated ones ? //or maybe double activation, and final activation after intialization ? // //ok seems strict check on all siblings is preferable!! // well rust, overflows are handled, kind of overkill geting here overlow checks - implmenting fuzzer not OS if same_kind * self . cfg . ratio > self . cfg . max_queue_size * 1 { return false } if self . states . contains_key ( & thread :: current ( ) . id ( ) ) { panic ! ( " " fuzzy_info name ) ; } self . states . insert ( thread :: current ( ) . id ( ) , fuzzy_info ) ; true }
we fuzzing only one state in one thread!
we fuzzing only one state in one thread!
&mut self
fuzzy_info
StateInfo
&mut self
fuzzy_info
StateInfo