We have a good example of a Sketchup C Extension to build on, made by @thomthom here:
I am developing an extension building on this model, and I would like to go one further. Instead of Ruby calling the C extension and waiting for the C program to complete, I would like Ruby to call the C extension, and continue about its business, and the C extension to call Ruby again when it has completed its job. I understand that this is referred to as an ‘asynchronous’ function call.
I know that Skalp (@Guy ? ) must do something like this. There has also been some discussion here about using the ViewObserver object to periodically check after calling Sketchup.send_action(), but I am not sure this is ideal.
Asynchronous calls also work in the WindowDialog, but again, that seems hacky to me.
Are there any examples out there for asynchronous calls to C?
PS - I found an interesting article for a Ruby-centric approach here: http://www.burgestrand.se//articles/asynchronous-callbacks-in-ruby-c-extensions/