Twisted

Twisted

May 25, 2024 | seedling, permanent

tags :

Python Apps #

An event-driven networking engine Written in Python ref

github

What is the Twisted reactor? #

The concept of a reactor involves distributing events from multiple sources to their recipients within a single-threaded environment. The reactor’s event loo Event Loop is at the core of Twisted’s operation.

The reactor is aware of network, file system, and timer events. It waits for events and then handles them, allowing for abstraction of platform-specific behavior and presenting interfaces to simplify event handling anywhere on the network stack. ref

The reactor is the core of the event loop within Twisted – the loop which drives applications using Twisted. The event loop is a programming construct that waits for and dispatches events or messages in a program. It works by calling some internal or external “event provider”, which generally blocks until an event has arrived, and then calls the relevant event handler (“dispatches the event”). The reactor provides basic interfaces to a number of services, including network communications, threading, and event dispatching. ref


Links to this note

Go to random page

Previous Next