pub fn start(this: VWeak<Self, P>) {
        loop {
            if !P::transaction(|j| {
                if let Some(this) = this.promote(j) {
                    let mut pos = this.pos.lock(j);
                    if pos.0 < this.filenames.len() {
                        let filename = &this.filenames[pos.0];
                        let mut f =
                            BufReader::new(File::open(filename.as_str()).expect("open failed"));
                        let mut read = 0;
                        if f.seek(SeekFrom::Start(pos.1)).is_ok() {
                            let mut buf = StdVec::<u8>::new();
                            let mut line = StdVec::<u8>::new();
                            let mut lines = this.lines.lock(j);
                            loop {
                                let r = f.read_until(b'\n', &mut buf).expect("read_until failed");
                                if r != 0 {
                                    read += r;
                                    line.append(&mut buf);
                                    if read >= BATCH_SIZE {
                                        let s = StdStr::from_utf8(line).expect("from_utf8 failed");
                                        lines.push(PString::from_str(&s, j), j);
                                        pos.1 += read as u64;
                                        break;
                                    }
                                } else {
                                    if !line.is_empty() {
                                        let s = StdStr::from_utf8(line).expect("from_utf8 failed");
                                        lines.push(PString::from_str(&s, j), j);
                                    }
                                    pos.1 = 0;
                                    pos.0 += 1;
                                    break;
                                }
                            }
                        } else {
                            pos.1 = 0;
                            pos.0 += 1;
                        }
                        true
                    } else {
                        false
                    }
                } else {
                    false
                }
            })
            .unwrap()
            {
                return;
            }
        }
    }
/// Starts reading the files and adding to the `lines`
Starts reading the files and adding to the `lines`
Starts reading the files and adding to the ` lines `
pub fn start(this: VWeak<Self, P>) {
        loop {
            if !P::transaction(|j| {
                if let Some(this) = this.promote(j) {
                    let mut pos = this.pos.lock(j);
                    if pos.0 < this.filenames.len() {
                        let filename = &this.filenames[pos.0];
                        let mut f =
                            BufReader::new(File::open(filename.as_str()).expect("open failed"));
                        let mut read = 0;
                        if f.seek(SeekFrom::Start(pos.1)).is_ok() {
                            let mut buf = StdVec::<u8>::new();
                            let mut line = StdVec::<u8>::new();
                            let mut lines = this.lines.lock(j);
                            loop {
                                let r = f.read_until(b'\n', &mut buf).expect("read_until failed");
                                if r != 0 {
                                    read += r;
                                    line.append(&mut buf);
                                    if read >= BATCH_SIZE {
                                        let s = StdStr::from_utf8(line).expect("from_utf8 failed");
                                        lines.push(PString::from_str(&s, j), j);
                                        pos.1 += read as u64;
                                        break;
                                    }
                                } else {
                                    if !line.is_empty() {
                                        let s = StdStr::from_utf8(line).expect("from_utf8 failed");
                                        lines.push(PString::from_str(&s, j), j);
                                    }
                                    pos.1 = 0;
                                    pos.0 += 1;
                                    break;
                                }
                            }
                        } else {
                            pos.1 = 0;
                            pos.0 += 1;
                        }
                        true
                    } else {
                        false
                    }
                } else {
                    false
                }
            })
            .unwrap()
            {
                return;
            }
        }
    }
pub fn start ( this : VWeak < Self , P > ) { loop { if ! P :: transaction ( | j | { if let Some ( this ) = this . promote ( j ) { let mut pos = this . pos . lock ( j ) ; if pos . 0 < this . filenames . len ( ) { let filename = & this . filenames [ pos . 0 ] ; let mut f = BufReader :: new ( File :: open ( filename . as_str ( ) ) . expect ( " " ) ) ; let mut read = 0 ; if f . seek ( SeekFrom :: Start ( pos . 1 ) ) . is_ok ( ) { let mut buf = StdVec :: < u8 > :: new ( ) ; let mut line = StdVec :: < u8 > :: new ( ) ; let mut lines = this . lines . lock ( j ) ; loop { let r = f . read_until ( b'\n' , & mut buf ) . expect ( " " ) ; if r != 0 { read += r ; line . append ( & mut buf ) ; if read >= BATCH_SIZE { let s = StdStr :: from_utf8 ( line ) . expect ( " " ) ; lines . push ( PString :: from_str ( & s , j ) , j ) ; pos . 1 += read as u64 ; break ; } } else { if ! line . is_empty ( ) { let s = StdStr :: from_utf8 ( line ) . expect ( " " ) ; lines . push ( PString :: from_str ( & s , j ) , j ) ; } pos . 1 = 0 ; pos . 0 += 1 ; break ; } } } else { pos . 1 = 0 ; pos . 0 += 1 ; } true } else { false } } else { false } } ) . unwrap ( ) { return ; } } }
Starts reading the files and adding to the `lines`
Starts reading the files and adding to the ` lines `
this
VWeak<Self, P>