 // different non-shared strings that point to the same shared buffer.
 
 enum ThreadID {
-  case Leader
-  case Follower
+  case Primary
+  case Replica
 }
 
 var barrierVar: UnsafeMutablePointer<_stdlib_pthread_barrier_t> = nil
 var sharedString: String = ""
-var followerString: String = ""
+var replicaString: String = ""
 
 func barrier() {
   var ret = _stdlib_pthread_barrier_wait(barrierVar)

    barrier()

    // Append to the private string.
    if tid == .Leader {
      privateString.appendContentsOf("def")
    } else {
      privateString.appendContentsOf("ghi")

func sliceConcurrentAppendThread(tid: ThreadID) {
  for i in 0..<100 {
    barrier()
    if tid == .Primary {
      // Get a fresh buffer.
      sharedString = ""
      sharedString.appendContentsOf("abc")
