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

// different non-shared strings that point to the same shared buffer.

enum ThreadID {
  case Leader
  case Follower
}

var barrierVar: UnsafeMutablePointer<_stdlib_pthread_barrier_t> = nil
var sharedString: String = ""
var followerString: String = ""

func barrier() {
  var ret = _stdlib_pthread_barrier_wait(barrierVar)

  expectEqual(0, ret)

  let (createRet1, tid1) = _stdlib_pthread_create_block(
    nil, sliceConcurrentAppendThread, .Primary)
  let (createRet2, tid2) = _stdlib_pthread_create_block(
    nil, sliceConcurrentAppendThread, .Replica)

  expectEqual(0, createRet1)
  expectEqual(0, createRet2)
