@Jay Yes, fair enough. Granted that CF doesn't guarantee the order of execution when processing threads in a request, does the application in this case really have the possibility of having multiple threads making sequential changes to that specific session variable (which is thread-safe to that user already) on different threads at the same time? Are there Ajax or iframe calls or something that could be making updates to that session var for that user at the same time in a situation where the order of execution could cause an unexpected value to be read back out by the server? That would be a very rare condition, but if it's possible, then, yes, you should lock.
As for reading from the application scope, as in the OP example, that's at least going to be covered by the thread-safe nature of MX, as noted in Simon's entry. To me, it just seems that you almost need to prove out that your application is likely to allow a true race condition before locking every call. Even when I used to do some fairly complex apps that happened to be iframe-driven, I only let one frame ever *write* to persistent scope, the others were only reads, so for something like session or client scope, the move from 4.5 to MX was a great relief in that regard. But certainly to each his own :) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323058 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4