Updates 3.1.0-RC3 für Hauptverzeichnis inkl. Original-Dateien

Ich hab mal im #phpbb-dev nach gefragt. Nicofuma war so nett, es mal zu erklären:
> [22:43:18] <@Nicofuma> imagine that you have a value (named A) that you want to increase each time a page is hit
[22:43:51] <Crizzo> k
[22:43:59] <@Nicofuma> but you want to have an exact count
[22:44:48] <@Nicofuma> and when in the general case you can't ensure that if the two pages are loaded exactly at the same time the value will be increased twice
[22:45:18] <Crizzo> k
[22:45:45] <@Nicofuma> there many solution to solve the issue
[22:45:57] <@Nicofuma> and one of them is to use an atomic set
[22:46:25] <@Nicofuma> the idea of the atomic-set is that you give to the function 3 thingq
[22:46:27] <@Nicofuma> things*
[22:46:31] <@Nicofuma> the variable to set
[22:46:36] <@Nicofuma> the value you want to set
[22:46:44] <@Nicofuma> and the current value
[22:47:16] <@Nicofuma> and then the function will set the desired value only if the current value match the given current value
[22:47:39] <Crizzo> okay
[22:47:41] <@Nicofuma> because if they don't match it meens that someone else changed the value in the meantime
[22:47:47] <Crizzo> and this is explained with this sentence?
[22:47:57] <@Nicofuma> in this case the function return false and do no change the value
[22:48:09] <@Nicofuma> Sets a configuration option’s value only if the old matches the current value <-- i mean, this makes no sense^^
[22:48:34] <@Nicofuma> => set the value only if the "given current value" match the "real current value"
[22:48:45] <@Nicofuma> and then return true
[22:48:49] <@Nicofuma> otherwise return false
[22:48:57] <Crizzo> k
[22:49:03] <Crizzo> then i think, we will find a solution^^
[22:49:07] <@Nicofuma> generally it is used combined with a loop
[22:49:28] <@Nicofuma> while(!atomic_set(var, old, desired));
[22:49:58] <@Nicofuma> do {
[22:49:58] <@Nicofuma> old = get(var);
[22:49:58] <@Nicofuma> } while(!atomic_set(var, old, desired));
[22:50:01] <@Nicofuma> to be exact
[22:50:43] <@Nicofuma> it's used very often in "system programmation"
[22:51:08] <@Nicofuma> but rarely for a web app I think :)