~marlin-devs/marlin/trunk

« back to all changes in this revision

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

  • Committer: am.monkeyd at gmail
  • Date: 2012-01-29 11:04:41 UTC
  • Revision ID: am.monkeyd@gmail.com-20120129110441-g1rymwbhptsze12m
bug #919454 no need to join the thread, it doesn't avoid the crash. Just check on the thread the validity of Directory.ASync object.

Show diffs side-by-side

added added

removed removed

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