 		precondition(!invokeCheck.isCancelled, "Work run multiple times")
 		invokeCheck.cancel()
 #endif
-		work?.forEach { $0() }
+		switch work {
+		case .none: break
+		case .single(let w): w()
+		case .multiple(let ws):
+			for w in ws {
+				w()
+			}
+		}
 	}
 }

//  IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//

// Simple thread safety:
//  1. No client "work" (functions or closures) should be invoked inside a private dispatch_queue/lock
//  2. No client supplied data should be released inside a private dispatch_queue/lock
// To facilitate this requirement, "lock internal" methods can return DeferredWork. DeferredWork values must be passed up the stack until they can be invoked outside any dispatch_queue.
//
// To ensure that DeferredWork is not simply forgotten without running, at debug time it includes an OnDelete check that raises a precondition failure if the DeferredWork has not been run.
public struct DeferredWork {
	var work: [() -> Void]?

#if DEBUG
	let invokeCheck: OnDelete = { () -> OnDelete in

		precondition(!invokeCheck.isCancelled, "Work appended to an already cancelled/invoked DeferredWork")
		other.invokeCheck.cancel()
#endif
		switch other {
		case .none: break
		case .single(let otherWork): self.append(otherWork)
		case .multiple(let otherWork):
			switch self {
			case .none: work = .multiple(otherWork)
			case .single(let existing):
				var newWork: ContiguousArray<() -> Void> = [existing]
				newWork.append(contentsOf: otherWork)
			case .multiple(var existing):
				work = .none
				existing.append(contentsOf: otherWork)
				work = .multiple(existing)
			}
		}
	}
	
	public mutating func append(_ additionalWork: @escaping () -> Void) {
		switch work {
		case .none: work = .single(additionalWork)
		case .single(let existing): work = .multiple([existing, additionalWork])
		case .multiple(var existing):
			work = .none
			existing.append(additionalWork)
			work = .multiple(existing)
		}
	}
	
