Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Subtil (0.18 sec)

  1. internal/dsync/dsync_test.go

    	cancel := func() {
    		cl()
    		wg.Done()
    	}
    
    	if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) {
    		t.Fatal("GetLock() should be successful")
    	}
    
    	// Wait until context is canceled
    	wg.Wait()
    	if ctx.Err() == nil {
    		t.Fatal("Unexpected error", ctx.Err())
    	}
    
    	// Should be safe operation in all cases
    	dm.Unlock(context.Background())
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
Back to top