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

Резултати

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

Пребарај: #propulsion

当前筛选 #propulsion清除筛选
Universe Mysteries 🪐

@cosmomyst · Post #691 · 21.02.2026 г., 22:21

🪐 NASA’s Psyche mission is sending a high-tech spacecraft to the asteroid 16 Psyche, testing a new electric propulsion system called Hall thrusters. Hall thrusters use electricity and magnetic fields to accelerate charged particles (ions) for thrust, offering a more efficient way to travel long distances—demonstrating key technology that could power spaceships to worlds like Ceres or the moons of Jupiter in the future. ✨ #spaceships⚡#propulsion⚡#asteroids⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #561 · 16.12.2025 г., 12:21

🪐 NASA’s Deep Space Transport concept envisions a future spaceship designed to carry astronauts between Earth and Mars, using advanced solar electric propulsion for long-distance travel. Unlike chemical rockets, solar electric propulsion uses sunlight to generate electricity and power ion engines, allowing spacecraft to efficiently accelerate over months as they approach destinations like the Red Planet. ✨ #spaceships⚡#Mars⚡#propulsion⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #304 · 20.09.2025 г., 19:21

🪐 The future of interstellar travel may hinge on new propulsion ideas being studied today, like nuclear electric propulsion—which uses nuclear reactors to generate electricity for ultra-efficient ion engines. NASA has tested this kind of technology in missions like Deep Space 1, and scientists hope that one day, such systems could send spacecraft toward distant stars like Proxima Centauri far faster than chemical rockets ever could. ✨ #spaceships⚡#propulsion⚡#ProximaCentauri⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #233 · 06.09.2025 г., 20:11

🪐 NASA's Psyche mission, launched in 2023, is using solar electric propulsion—an advanced spaceship technology that turns sunlight into electricity to power ion thrusters. Psyche’s journey to the metallic asteroid 16 Psyche will take it over 3.5 billion kilometers, marking one of the longest deep-space flights ever attempted using this efficient, future-ready form of space travel. ✨ #spaceships⚡#innovation⚡#propulsion⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries ​

Universe Mysteries 🪐

@cosmomyst · Post #574 · 22.12.2025 г., 22:21

🪐 The future of interstellar travel could harness the power of antimatter propulsion, a technology based on using matter and antimatter (mirror-opposite particles) that annihilate each other to release immense energy. Experiments at places like CERN have shown how much energy is produced when particles like protons and antiprotons meet—a reaction far more powerful than any chemical rocket, making antimatter a real contender for traveling to distant stars such as Proxima Centauri in the distant future. ✨ #spaceships⚡#antimatter⚡#propulsion⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​

Universe Mysteries 🪐

@cosmomyst · Post #334 · 26.09.2025 г., 20:21

🪐 The challenge of reaching other star systems like Proxima Centauri, over 4 light-years away, drives scientists to explore futuristic spaceship concepts beyond anything in use today. One promising idea is fusion propulsion, which would harness the power of fusing atomic nuclei—just like in the Sun—to generate immense thrust, potentially making journeys to nearby stars possible in a matter of decades rather than millennia. ✨ #fusion⚡#propulsion⚡#spaceships⚡#ProximaCentauri⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries 👉more Channels ​