~marlin-devs/marlin/trunk

« back to all changes in this revision

Viewing changes to libcore/gof-directory-async.vala

  • Committer: xapantu
  • Date: 2012-01-23 21:06:03 UTC
  • Revision ID: xapantu@gmail.com-20120123210603-mfcnr0dont40tuuw
Try to fix bug #919454 by joining a thread

Show diffs side-by-side

added added

removed removed

Lines of Context:
509
509
        return null;
510
510
    }
511
511
 
 
512
    ~Async () {
 
513
        if(thumbs_thread_runing)
 
514
            th.join();
 
515
    }
 
516
 
512
517
    private int icon_size;
 
518
    unowned Thread<void*> th;
513
519
    public void threaded_load_thumbnails (int size)
514
520
    {
515
521
        try {
516
522
            icon_size = size;
517
523
            thumbs_stop = false;
518
524
            //unowned Thread<void*> th = Thread.create<void*> (load_thumbnails_func, false);
519
 
            Thread.create<void*> (load_thumbnails_func, false);
 
525
            th = Thread.create<void*> (load_thumbnails_func, true);
520
526
        } catch (ThreadError e) {
521
527
            stderr.printf ("%s\n", e.message);
522
528
            return;