For example:
var i = 0;
while(true)
http.request('a url', callback_f);
function **callback_f**(){
**i++**;
}
In my simple imaginary example, some request might try to increase i's value in the same time, How can I write a code which is thread safe in NodeJS?