View Single Post
04-17-12, 04:17 PM   #12
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by p3lim View Post
That is very odd, been using my method for auto-accepting group invites from people in my guild, and it has never failed.
That's great, but it's neither relevant nor helpful.

If A and B are two outcomes of a race condition, the order in which A and B occur will probably be consistent in your game client (for example, B will always happen before A for you) but THIS IS NOT CONSISTENT BETWEEN OTHER INSTALLATIONS OF WORLD OF WARCRAFT ON OTHER COMPUTERS (or even on other hard drives on the same computer, and maybe not even between separate installations on the same hard drive). Someone else's game client will always see B happen before A.

If you are writing code for other people to use, then it does not matter whether A or B happens first for you, because the order of outcomes may be different for other people, and what happens in your game client is completely irrelevant.


If you don't understand what "race conditon" means, or how this is one:

A race condition is a situation where, in theory, two (or more) things are supposed to happen at the same time. However, in reality, only one thing can actually happen at a time, so one thing happens before the other.

This is a race condition because both your addon's frame and the default UI's frame are registered for the same event. In theory, they receive the event at the same time, but in reality, one receives it before the other. Since the order in which frames in WoW recieve an event is undefined, you cannot rely on one frame always receiving an event before another.

Without being able to look at WoW's source code, we cannot know what determines the order in a particular game client installation, or why it is consistent between sessions in the same installation, but inconsistent between different installations.

We can only know that it is consistent in the same installation, and that it is not consistent between different installations, and work with that.
  Reply With Quote