On 1 May 2016, at 19:33, Tyler Fleming Cloutier via swift-users <swift-users@swift.org> wrote:
> I’m creating a Swift package that uses Dispatch on OS X, but I am getting an > Illegal Instruction error after I register my block for an event. > Specifically, a UD2 instruction inside of libdispatch: Intel code uses the `ud2` illegal instruction for `__builtin_trap`, that is, as a way for the code to stop when some sort of error has been detected. In your case I believe that you’re using your dispatch source incorrectly. Specifically: * You should hold on to a reference to `dispatchSource`. * You need to `dispatch_resume` the source before it’ll do anything. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users