Comment 1 for bug 684690

Revision history for this message
Sean Reifschneider (jafo) wrote :

I can see that you would like EXISTS and NOT_FOUND could be useful to distinguish in this case, but the cas() function is documented to return non-zero on success. I'd half say this should be a different function, like cas_status() or something, that would return the 3 different values (SUCCESS, EXISTS and NOT_FOUND). I'd be reluctant to change the main cas() function, without comment from the wider group of users. Or maybe it could be some special class that tests 0/non-0, but also has methods for these extra status.

Comments?