anchor.diff:              lock terminatedLock (fun () -> terminated)
   
           member this.Start () =
  -
  -            // run thread as task
  -            let task = new Task (fun () ->
  -
  -                // create renderer
  -                let renderer = createRenderer2d () : Renderer2d
  -
  -                // mark as started
  -                lock startedLock (fun () -> started <- true)
  -
  -                // loop until terminated
  -                while not this.Terminated do
  -
  -                    // loop until submission exists
  -                    while Option.isNone this.SubmissionOpt && not this.Terminated do
  -                        Thread.Sleep 0
  -
  -                    // receive submission
  -                    let (eyePosition, eyeSize, eyeMargin) =
  -                        lock submissionLock (fun () ->
  -                            let submission = Option.get submissionOpt
  -                            submissionOpt <- None
  -                            submission)
  -
  -                    // receive messages
  -                    let messagesReceived =
  -                        lock messagesLock (fun () ->
  -                            let messagesReceived = messages
  -                            messages <- List ()
  -                            messagesReceived)
  -
  -                    // render
  -                    renderer.Render eyePosition eyeSize eyeMargin messagesReceived
  -
  -                    // loop until swapping
  -                    while not this.Swapping && not this.Terminated do
  -                        Thread.Sleep 0
  -
  -                    // swap
  -                    renderer.Swap ()
  -
  -                    // clear swap
  -                    lock swapLock (fun () -> swap <- false)
  -
  -                // clean up
  -                renderer.CleanUp ())
  -
  -            // remember task
  -            taskOpt <- Some task
  -
  -            // start task
  -            task.Start ()
  -
  -            // wait until started (renderer initialized)
  +            let thread = Thread this.Run
  +            threadOpt <- Some thread
  +            thread.Start ()
               while not this.Started do Thread.Sleep 0
   
           member this.EnqueueMessage message =
  
positive.code:     let swapLock = obj ()
      let mutable swap = false
  
      member this.Started =
          (this :> RenderProcess2d).Started
  
      member this.Terminated =
          (this :> RenderProcess2d).Terminated
  
      member private this.SubmissionOpt =
  
negative.code:             | None -> () // ignore invalid swap order
  
          member this.Terminate () =
              match threadOpt with
              | Some thread ->
                  match this.Started with false -> failwithumf () | true -> ()
                  lock terminatedLock (fun () ->
                      if terminated then raise (InvalidOperationException "Redundant Terminate calls.")
                      terminated <- true)
                  thread.Join ()
              | None -> raise (InvalidOperationException "Cannot terminate before starting.")