1. 09 Apr, 2019 3 commits
  2. 06 Apr, 2019 1 commit
  3. 23 Mar, 2019 1 commit
  4. 22 Mar, 2019 10 commits
  5. 21 Mar, 2019 2 commits
  6. 20 Mar, 2019 5 commits
  7. 16 Mar, 2019 1 commit
  8. 15 Mar, 2019 1 commit
    • Steven Allen's avatar
      remove ThreadSafeDatastore · 9f529bc3
      Steven Allen authored
      It's a lie! We:
      
      1. Assume that our datastores are thread-safe all over the place, not bothering
         to check for this interface.
      2. Implement this interface for, e.g., the mount datastore that _may not_ be
         thread-safe (depending on the sub-datastores).
      
      Basically, there's no sane way to to do something like this in go. What we
      _want_ is:
      
      ```rust
      pub trait ThreadSafe {}
      
      struct MyWrapper<D: Datastore> { ... }
      
      impl<D: Datastore> ThreadSafe for MyWrapper<D> where D: ThreadSafe {}
      ```
      
      Actually, we don't even need this because rust has already done all the hard
      work with the `Sync` trait.
      
      ....
      
      But we're using go which barely has types.
      
      ---
      
      For completeness, it's actually possible to do this in go:
      
      ```go
      type threadSafeMixin struct{}
      func (threadSafeMixin) ThreadSafe() {}
      
      func NewWrapper(d Datastore) Datastore {
        if _, ok := d.(ThreadSafe) {
          return &struct{myWrapper, threadSafeMixin}{myWrapper{d}, threadSafeMixin{}}
        }
        return &myWrapper{d}
      }
      ```
      
      Let's not.
      9f529bc3
  9. 28 Feb, 2019 1 commit
  10. 07 Feb, 2019 1 commit
  11. 06 Feb, 2019 4 commits
  12. 31 Jan, 2019 2 commits
  13. 29 Jan, 2019 3 commits
  14. 28 Jan, 2019 3 commits
  15. 24 Jan, 2019 2 commits