Возможно, стоит пояснить разницу между синхронизацией из thread/process-safe и синхронизацией с помощью Lock🤔
Наша задача — заставить разные процессы и потоки обращаться к базе данных (или любым другим ресурсам) последовательно. Чтобы не случилось так называемого race condition, то есть состояние гонки. Это когда разные потоки или процессы пытаются одновременно что-то сделать с одним и тем же ресурсом.
В этом случае нам нужна какая-то логика ограничения. Пока один процесс не завершил своё действие, другие не могут получить доступ к ресурсу.
Так вот, thread-safe и process-safe означает что отдельно взятые операции записи в БД гарантированно будут последовательны. Запросы из разных процессов или потоков выстроятся в очередь и не будут мешать друг другу. Лучше всего когда этот блок реализован на уровне БД в виде атомарных операций или ещё как-то.
Но зачем нам тогда еще дополнительный Lock?
Этот способ синхронизации используется когда процесс никак не укладывается в одно действие и должен сделать множество операций прежде чем дать доступ следующему. В этом случае процесс ставит некий глобальный Lock на ресурс и никто другой, даже получив законное право на доступ, не может ничего сделать. Все ждут пока этот Lock не будет снят.
Это решается на уровне приложения и правильность реализации полностью в вашей ответственности. Например, если забыли разблокировать или сделали перекрёстный Lock (Deadlock как на картинке), то всё зависнет в бесконечном ожидании.
#basic
#FARM/USDT analysis :
#FARM is currently in an uptrend, exhibiting a series of higher highs (HHs) and higher lows (HLs). The price is presently consolidating above the 200-period exponential moving average (EMA), and a bounce is anticipated, which would support the continuation of its bullish momentum. For a long entry, it is advisable to wait for a breakout above the $53 level to confirm the upward movement.
TF : 1H
Entry : $53.00
Target : $66.00
SL : $47.50
⚠️ Осторожно: после этого AMA может внезапно потянуть в #stake, #lend и #farm.
@bemofinance + @evaaprotocol + @bidask = 🔥
Увидимся завтра в 08:00 UTC! 👀
⚡️Electra meets you
The first DEX to trade perp assets directly from your wallet with high leverage, deep liquidity and the lowest fees.
Warm up with Bulls'n'Bears Game — pump $BTC to 1 billion, rack up points, and bring in more frens-electrons.
⭐️ More points mean bigger rewards!
⚡️Join Electra now!⏺
#TON#DEX#trade#farm#BTC
🤑Blum has released update — now we have the opportunity to create a tribe!
⚫️Go to tribe
⚫️ Every 8 hours we press “Claim”
⚫️ If possible, we spend tickets, because there was information that after a while they will expire
Also recently added the function of connecting a wallet and unlimited invites
♾
🛖Join our tribe and farm points for
💵 10% faster, as usual, let's try to reach the top together!
#blum#tribe#ton#farm
😸Farm $CATI on🎰🎰🎰
Today, 2 new farming pools with impressive prize pools appeared on the STON.fi exchange:
💎CATI/TON: 10,000 STON ($43,000)
🪙CATI/USDT: 10,000 STON ($43,000)
🗓 Farming will last until October 4. There is no blocking of LP tokens.
How to get rewards?
1. Top up the liquidity pool and receive your LP tokens
2. Click Farm on your liquidity pool
You can find detailed instructions here or watch our video guide📹
Farming is the process of earning rewards for providing your cryptocurrency as liquidity to decentralized finance platforms #DeFi.
#catizen#farm#stonfi#DEX#CATI
Raffle-airdrop $THNG from Drop Hunter and a mini-review of the token
😀 Things Token plans to launch an RWA platform for buying and selling real assets. It is hosted on our 🪙#TON blockchain and is already available on DEX platforms. You can learn more about the project.
The conditions for the #Airdrop are below:
🟡Launch the bot.
🟡Subscribe to the channel.
🟡Invite 5 friends (old referrals count).
🟡Buy 1 ticket and wait for the results to be announced.
Two-tier token system:
➖$THNGP: A token with voting rights in the DAO, mined through mining and participation in the presale. Can be exchanged for 👁#THNG at a ratio of 1:10. The transfer of this token is limited to a single transaction (for example, if you need to change your wallet). It can only be freely sent and received through mining, voting, and exchange (conversion) smart contracts. Do not attempt to sell these tokens or transfer them to exchanges.
😀$THNG: A freely tradable token for trading, transferring and other purposes.
🟡Drop type - Raffle.
🟡Total volume - 28 million $THNG coins
🟡Total winners - 400 people.
🟡For each user – $65,000 THNG for 1 ticket (50,000 points = 1 ticket)
😀 At the moment, THNG 2.0 staking is available with an APR of ~ 160% from August 23 to September 24.
🔥Keep farming and participate in all activities of DropHunters
#farm#drop#TON#web3