Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
被CMSIS-DSP的FFT创飞 (其实是没仔细读文档
arm官方文档明确指出了 arm_rfft_fast_f32 会原地修改输入缓冲区, 然而咱用库之前没仔细读文档
Due to the use of complex transform internally, the source buffer is modified by the rfft.
看到函数参数有输入和输出指针, 然后就想当然认为函数内部一定不会覆盖输入缓冲区, 再加上输入循环缓冲用的是zero-copy, 调用FFT也是直接传入了缓冲区指针, 所以相当于算了一次FFT后直接污染了整个缓冲区
#Debug
#debug#洋屁
playing Valheim with friends
started a Linux Dedicated Server w/ Azure Playfab Crossplay Support.
can't connect server using IP and Playfab API always connecting
> Unable to preload the following plugins: libparty.so
checking libparty.so using > ldd libparty.so
IT NEEDS libpulse-dev ???????
Why? Audio lib requested SRSLY?
sudo apt install libpulse-dev
all works...
https://pypi.python.org/pypi/django-debug-toolbar
A configurable set of panels that display various #debug information about the current #request/#response.
The #Django_Debug_Toolbar is a configurable set of panels that display various debug information about the current request/response and when clicked, display more details about the panel’s content.
Here’s a screenshot of the toolbar in action:
#swift#analysis#analytics#cocoapods#crashlytics#debug#debugger#debugging#hacktoberfest#layout_debugger#leak_detection#log#logs_analysis#networking#performance_analysis#sandbox#swift#swift6#ui#uikit#view
DebugSwift is a comprehensive toolkit that simplifies debugging for Swift iOS apps by providing real-time monitoring of network requests, performance metrics (CPU, memory, FPS), crash reports, and app resources like keychain and user defaults. It includes interface tools for visualizing layouts with grid overlays and touch indicators, plus memory leak detection and console logging. The main benefit is that you can quickly identify and fix issues during development without leaving your app—just shake your device to toggle the debug panel, making troubleshooting faster and more efficient.
https://github.com/DebugSwift/DebugSwift