Module: RMExtensions::ObjectExtensions::Util
- Defined in:
- lib/motion/util.rb
Instance Method Summary collapse
-
#rmext_assert_main_thread! ⇒ Object
Raises an exception when called from a thread other than the main thread.
Instance Method Details
#rmext_assert_main_thread! ⇒ Object
Raises an exception when called from a thread other than the main thread. Good for development and experimenting.
17 18 19 |
# File 'lib/motion/util.rb', line 17 def rmext_assert_main_thread! raise "This method must be called on the main thread." unless NSThread.currentThread.isMainThread end |