Posted by Valdur on Tue, 12 Jan 2010 13:42:40
I have a problem with an addon, maybe someone can help me with some hints. I have a function which needs about 100-300 ms with my PC and cable connection, this function results in a 100-300 ms interruption of WOW.
Is there a way to make this function parallel or not blocking for the rest of wow?
Posted by jnwhiteh on Tue, 12 Jan 2010 17:01:25
The short answer is no, but why does your function need time? That should never be the case in WoW's event-based programming API. What are you trying to accomplish?
Posted by Valdur on Tue, 12 Jan 2010 19:01:35
The function should do some statistik analysis of the players achivments when i mouseover the player... and the achivement functions needs some time...
Posted by jnwhiteh on Tue, 12 Jan 2010 21:36:21
That's why there are events. You don't 'wait x seconds', you register for an event, register a callback function and then make a corresponding API call. This is all covered in the section of the book that discusses event-based programming.