anchor.diff:      ig |> Sg.ofIndexedGeometry
   
   
  +let running = new ManualResetEventSlim()
  +
   [<EntryPoint>]
   let main argv = 
       use app = new OpenGlApplication()
  
positive.code:     let task = app.Runtime.CompileRender(BackendConfiguration.UnmanagedOptimized, sg)
  
      win.Keyboard.Down.Values.Subscribe (fun k ->
          printfn "starting"
          if k = Keys.Enter then
              start()
      ) |> ignore
  
      win.RenderTask <- task |> DefaultOverlays.withStatistics
  
negative.code:     let fac = TaskFactory(TaskCreationOptions.LongRunning,TaskContinuationOptions.AttachedToParent)
  
      let startTask (f : unit -> unit) =
          Task.Factory.StartNew(f, TaskCreationOptions.LongRunning)
  
      let pfor (s : seq<'a>) (f : 'a -> unit) =
          s |> Seq.toList
            |> List.map (fun v -> startTask (fun () -> f v))
            |> List.iter (fun t -> t.Wait())
  
  
      let inputCounter = ref 0
      let start() =
          Task.Factory.StartNew(fun () ->
              for _ in 0..(objectCount / parallelLoads) do
                  running.Wait()
                  pfor [1..parallelLoads] (fun _ ->
                      let points = newPoints objectSize
  
                      // simulate something long-running
                      Thread.Sleep(random.Next(minLoadTimeinMS, maxLoadTimeInMS))
  
  
                      //Log.startTimed "adding"
                      // submit the new point-set
                      transact (fun () ->
                          lock leafs (fun () -> leafs.Add points |> ignore)
                      )
                      Interlocked.Increment(&inputCounter.contents) |> ignore
                      Log.line "added: %A" !inputCounter
                      //Log.stop()
                  )
          ) |> ignore
  
      start()
  
      let initialView = CameraView.LookAt(V3d(3,3,3), V3d.Zero)
      let view = DefaultCameraController.control win.Mouse win.Keyboard win.Time initialView
  