Using main_thread_callback correctly 2010-01-16 08:38:47 Essentially, during my plugin's initialization, I do some possibly-lengthy operations (like user authentication using a remote server). Obviously this is no good, because if say the server is down, foobar will be locked up for x seconds where x is the timeout I've specified in cURL. This is just one example.So I figured I'd fire off a Boost worker thread to take care of this stuff. The problem I'm running into is that if all things go well (authentication, etc.) I want to dynamically register my playback_callback. Before, in the init() method, this wasn't a problem, but of course I'm now getting crashes soon after foobar is started.From what I can gather, the best approach to solving this is to hand off the registering of my playback_callback to a main_thread_callback. I've been working at this for a few hours now... not sure if it's the sleep deprivation or what, but I'm having the hardest time implementing a working solution.I hate to ask for example code, but could anyone possibly help me out here? I tried to go by the code posted in this thread, but I get an error about not being able to instantiate an abstract class. (I wrote a class that extends main_thread_callback, but apparently there are some virtual functions I didn't define?)Any information or tips on implementing a main_thread_callback would very much be appreciated! Or if there's a better way to accomplish what I'm trying to do, I'd love to hear your thoughts on that too.