pub unsafe fn add_worker(&self, worker: &Worker) {
        
        let new_thread = qt_core::QThread::new_0a();
        // Take our worker we've been given and assign it to a controller thread.
        //worker.workerobj.move_to_thread(&self.workerthreads);
        worker.workerobj.move_to_thread(&new_thread);

        
        // Lock our thread vector
        let threadvec_arc = self.workerthreads.clone();
        let mut threadvec = threadvec_arc.lock().unwrap();
        // Push our new thread to our list
        threadvec.push(new_thread);
        //self.workerthreads.push(new_thread);
        
    }
// Create a new thread and attach a worker to it
Create a new thread and attach a worker to it
Create a new thread and attach a worker to it
pub unsafe fn add_worker(&self, worker: &Worker) {
        let new_thread = qt_core::QThread::new_0a();
        // Take our worker we've been given and assign it to a controller thread.
        //worker.workerobj.move_to_thread(&self.workerthreads);
        worker.workerobj.move_to_thread(&new_thread);
        // Lock our thread vector
        let threadvec_arc = self.workerthreads.clone();
        let mut threadvec = threadvec_arc.lock().unwrap();
        // Push our new thread to our list
        threadvec.push(new_thread);
        //self.workerthreads.push(new_thread);
    }
pub unsafe fn add_worker ( & self , worker : & Worker ) { let new_thread = qt_core :: QThread :: new_0a ( ) ; // Take our worker we've been given and assign it to a controller thread. //worker.workerobj.move_to_thread(&self.workerthreads); worker . workerobj . move_to_thread ( & new_thread ) ; // Lock our thread vector let threadvec_arc = self . workerthreads . clone ( ) ; let mut threadvec = threadvec_arc . lock ( ) . unwrap ( ) ; // Push our new thread to our list threadvec . push ( new_thread ) ; //self.workerthreads.push(new_thread); }
Create a new thread and attach a worker to it
Create a new thread and attach a worker to it
&self
worker
&Worker
&self
worker
&Worker