From: Zoran V. <zv...@ar...> - 2005-12-31 17:35:10
|
Am 31.12.2005 um 18:20 schrieb Vlad Seryakov: > Another possible solution can be, pre-allocating maxconn upload > structs and update them without locks, it is integer anyway, so no > need to lock, 4 byte write is never innterupted, usually it is 1 > CPU instruction(true for Intel, maybe not for Sparc). Nope. Need locking even for integers. I've seen crazy things... OTOH, I'm not that concerned about the locking if it is short-lived and not frequently done. I believe the "not frequently done" is the hardest thing to judge. Zoran |