TGViewer
MadelineProto | Official Channel MadelineProto | Official Channel @madelineproto · 6.41K subscribers
Post #437 2.98K
Fully asynchronous MadelineProto!

MadelineProto now features async, for incredible speed improvements, and parallel processing.
Powered by amphp, MadelineProto wraps the AMPHP APIs to provide a simpler generator-based async API.

What exactly is async, you may ask, and how is it better than threading or multiprocessing?
Async is a relatively new programming pattern that allows you to easily write non-blocking code as if you were using standard blocking functions.


More simply put: with MadelineProto 4.0, each update is handled in parallel using a separate thread, and everything is MUCH faster (even on restricted webhosts; this is perfect for creating file downloader bots!).

To enable async, you have to do two simple things:
1) Load the latest version of MadelineProto
2) yield your method calls.


That's it!
No need to set up thread pools, use synchronization primitives, and so on...
Just yield $MadelineProto->messages->sendMessage instead of $MadelineProto->messages->sendMessage.
More from @madelineproto
  1. Oct 17, 2026Introducing MadelineProto 8.8.8, with video calls, group calls, livestreams and end-to-end…
  2. Oct 17, 2026Introducing MadelineProto 8.8.8, with video calls, group calls, livestreams and end-to-end…
  3. Jul 26, 2026Native, pure-PHP (no FFI, no shell, 💯 webhost support) group and video calls are working…
  4. Jun 16, 2026MadelineProto may also be affected if your upstreams aren't filtering invalid routes via R…
  5. Jun 16, 2026Indeed, looking at the announced routes i.e. in https://bgp.he.net/AS18101#_prefixes + htt…
  6. Jun 16, 2026⚠️ Indian telecom Reliance is sabotaging access to Telegram for millions of users OUTSIDE…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →