     }
     
     // Executed in background thread
-    func run() {
+    private func run() {
         _yielder(_yield)
         _yieldNil()
     }

//
// The yielder closure is executed on another thread, and each call to yield()
// will block until next() is called by the generator's thread.
struct LazyYieldGenerator<T>: Generator {
    var _task: LazyYieldTask<T>?
    let _yielder: ((T) -> ()) -> ()
    
    init(_ yielder: ((T) -> ()) -> ()) {
        _yielder = yielder
    }
    
    mutating func next() -> T? {
        if !_task {
            _task = LazyYieldTask(_yielder)
        }

    }
    
    // Called from generator thread to get next yielded value
    private func next() -> T? {
        if !_isBackgroundTaskRunning {
            dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
                self.run()
