TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #269 · 7 јул.

­Возможно, стоит пояснить разницу между синхронизацией из thread/process-safe и синхронизацией с помощью Lock🤔 Наша задача — заставить разные процессы и потоки обращаться к базе данных (или любым другим ресурсам) последовательно. Чтобы не случилось так называемого race condition, то есть состояние гонки. Это когда разные потоки или процессы пытаются одновременно что-то сделать с одним и тем же ресурсом. В этом случае нам нужна какая-то логика ограничения. Пока один процесс не завершил своё действие, другие не могут получить доступ к ресурсу. Так вот, thread-safe и process-safe означает что отдельно взятые операции записи в БД гарантированно будут последовательны. Запросы из разных процессов или потоков выстроятся в очередь и не будут мешать друг другу. Лучше всего когда этот блок реализован на уровне БД в виде атомарных операций или ещё как-то. Но зачем нам тогда еще дополнительный Lock? Этот способ синхронизации используется когда процесс никак не укладывается в одно действие и должен сделать множество операций прежде чем дать доступ следующему. В этом случае процесс ставит некий глобальный Lock на ресурс и никто другой, даже получив законное право на доступ, не может ничего сделать. Все ждут пока этот Lock не будет снят. Это решается на уровне приложения и правильность реализации полностью в вашей ответственности. Например, если забыли разблокировать или сделали перекрёстный Lock (Deadlock как на картинке), то всё зависнет в бесконечном ожидании. #basic

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #beechat

当前筛选 #beechat清除筛选
Libreware

@libreware · Post #1007 · 05.11.2021 г., 00:54

We just pushed the V1.2 of the Beechat Crank to our GitHub @beechatnetwork2 Beechat Crank is a human-powered, open-hardware, fully-waterproof, electricity generator. The project was born out of the need to power electronics in all off-grid scenarios. We needed a way to power our devices in all weather conditions, and making a human-powered generator meant that problem could be solved. When we looked for a solution, we didn't find what we were looking for, so we decided to make it, and make it open source! https://github.com/BeechatNetworkSystemsLtd/BeechatCrank/ Features High power (3A) USB-C IPX8 output 18650 3600 mAh battery (LG M36) Charging time of 4 hrs 24 min. to full charge with 10% efficiency loss at 4.5 Watts. Overcharge protection Parts Beechat Crank is composed of the main device, which we call the Heart. It contains the battery, the generator and all the electronics (the handle is detachable) The Pedal Case is an assembly which the Heart can be attached in. which dramatically speeds up the charging from 2.5 hours to 25-30 minutes. This is achieved with reduction gears to, with the same revolutions per minute, generate more electricity. Generator part We have chosen the 35L048B1B motor with a mass of 88 grams, giving us us 450 mA for each phase of the coil and works at 5V. The wire leads are connected via female Molex connectors to the charging PCB board. New modifications: * Added a Molex type connector to the PCB to connect the motor. * The Zener diodes were changed, by means of a rectifier bridge. * A new and improved Texas Instruments brand battery management chip was selected. * Added a boost converter to allow different voltage batteries. * New Portescap brand two-phase generator with 90% efficiency and peak power of 4.5 Watts was selected. #crank#beechat

Libreware

@libreware · Post #1295 · 21.06.2024 г., 11:55

Last weekend we presented the Beechat Rune device for the very first time, as part of the Volla Community days in Germany. Featuring 4 simultaneous streams, capable of audio and video streams with next-gen CRYSTALS cryptography, the Beechat Rune is a perfect addition to privacy-focused systems. @beechatnetwork2 #beechat#mesh#p2p