Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: Backlog
    • Labels:
      None

      Description

      (ticket requested here http://groups.google.com/group/clojure/browse_thread/thread/119311e89fa46806/4903ce25ff6deaa6#4903ce25ff6deaa6)

      The general idea is to declare invariants inside a transaction and, when at commit time an invariant doesn't hold anymore, the transaction retries.
      So it can both act as a kind of soft ensure or to specify actions that "partially commute".
      Thus it would enable coarser refs.

      See the attached file for quick prototype.

      User code would looks like:

      (invariant (@world :key))
      (commute world update-in [:key] val-transform-fn)

      This means the commute will occur only if (@world :key) returns the same value in-transaction and at commit point.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: