Method: RMX.assert_main_thread!

Defined in:
lib/motion/util.rb

.assert_main_thread!Object

Raises an exception when called from a thread other than the main thread. Good for development and experimenting.



15
16
17
# File 'lib/motion/util.rb', line 15

def self.assert_main_thread!
  raise "Expected main thread. #{Dispatch::Queue.current.description}" unless NSThread.currentThread.isMainThread
end