Multi-thread script

Hi to everyone!
I’m doing a script in Python. I have a windows form in a second thread and I need to call the rs.GetObjects() method. When i call the method show me an error. I think is because the method is called in a thread that is different from the main. Is it possible? How can I fix it?

Why is your form running on a second thread? This is not very typical.

Because I’ve got the error: Unable to load a new message on a single thread. I use the method to load the form.
Anyway I’ve changed the approach and I use the ShowDialog() method. When i run the rs.GetObjects() method I can’t select the ojects in the viewport.
A friend of mine suggest to me it is because the forms are in a modal type. It can be?
Thanks Steve!

I would never recommend creating dialogs on separate threads (it is very rare that this is needed)

When you run rs.GetObjects() you should close your dialog first. Another approach is to use Rhino.UI.Dialogs.PushPickButton