debounce runloop siwft code example
Example: debounce runloop siwft
let sub = NotificationCenter.default
.publisher(for: NSControl.textDidChangeNotification, object: filterField)
.debounce(for: .milliseconds(500), scheduler: RunLoop.main)
.subscribe(on: RunLoop.main)
.assign(to:\MyViewModel.filterString, on: myViewModel)