我正在使用在GAE的某些数据更新的任务。
我的问讯。
<queue>
<name>data-processing</name>
<rate>20/s</rate>
</queue>
My queue processing servlet decrease credit by 1 for every task. While processing it need to check for credit availability and proceed further only if credit is available.
信贷储存在一张桌上,一旦任务完成,就会更新。
我将这些任务视为read子,并对私刑问题表示担忧。
what if 2 or more tasks query/update credit table simultaniously? Do i need to create some locking mechenism? If yes then how?