As the name says, the
Wait() function waits for the thread to finish. Thus, it blocks the execution.
What you need is a thread that exist independently from your UI (a CommandData plugin is a UI plugin). You can start that thread in a CommandData plugin, but this plugin must not own the thread.
When the thread has finished, it can send a custom core message. You can catch that core message in a
MessageData plugin. Then you can read the thread's data safely from the main thread.
The C4DThread Manual gives some good overviews.