Tag

gevent

0 views collected around this technical thread.

Test Development Learning Exchange
Test Development Learning Exchange
Oct 12, 2023 · Backend Development

Practical Examples of Python Coroutine Libraries: asyncio, gevent, and trio

This article introduces Python coroutines as a lightweight concurrency model and provides ten practical code examples demonstrating how to use the asyncio, gevent, and trio libraries for asynchronous I/O, concurrent network requests, file operations, task scheduling, and more.

Asynchronous ProgrammingCoroutinePython
0 likes · 7 min read
Practical Examples of Python Coroutine Libraries: asyncio, gevent, and trio
Test Development Learning Exchange
Test Development Learning Exchange
Aug 3, 2023 · Backend Development

Python Coroutine Libraries: asyncio, gevent, and trio - 10 Practical Examples

This article explores three Python coroutine libraries - asyncio, gevent, and trio - providing 10 practical code examples demonstrating their use in asynchronous programming for tasks like IO operations, network requests, file handling, and more.

Asynchronous ProgrammingConcurrent ProgrammingPython
0 likes · 5 min read
Python Coroutine Libraries: asyncio, gevent, and trio - 10 Practical Examples
IT Services Circle
IT Services Circle
Jul 5, 2022 · Backend Development

Optimizing feapder Spider with Gevent: Reducing CPU Usage and Thread Count

This article demonstrates how adding two gevent monkey‑patch lines to a feapder spider reduces CPU usage from 121% to 99% while changing the effective thread count from 36 to 12, and discusses the underlying principle, performance trade‑offs, and future directions for coroutine support.

CPU optimizationPythonfeapder
0 likes · 6 min read
Optimizing feapder Spider with Gevent: Reducing CPU Usage and Thread Count
Python Programming Learning Circle
Python Programming Learning Circle
Dec 15, 2021 · Fundamentals

Understanding Iteration, Iterables, Iterators, Generators, Coroutines, Greenlet and Gevent in Python

This tutorial explains Python's iteration concepts, how to identify and create iterable objects, implement custom iterables and iterators, use the iter() and next() functions, build generators with yield, control execution with coroutines, and leverage greenlet and gevent for cooperative multitasking.

CoroutineGeneratorIterator
0 likes · 22 min read
Understanding Iteration, Iterables, Iterators, Generators, Coroutines, Greenlet and Gevent in Python
NetEase Game Operations Platform
NetEase Game Operations Platform
Aug 8, 2020 · Backend Development

Debugging “Instance XXX is not bound to a Session” Errors in Gevent‑Enabled Flask APIs with SQLAlchemy

This article analyzes the intermittent “Instance XXX is not bound to a Session” error that occurs after converting a Flask‑SQLAlchemy endpoint from serial to multithreaded/gevent concurrency, reproduces the issue with test code, explains the root cause in session handling, and provides a concrete fix by patching gevent before session initialization.

FlaskPythonSQLAlchemy
0 likes · 6 min read
Debugging “Instance XXX is not bound to a Session” Errors in Gevent‑Enabled Flask APIs with SQLAlchemy
360 Quality & Efficiency
360 Quality & Efficiency
Apr 29, 2016 · Operations

Optimizing Locust HTTP Requests with PycURL: Experiments and Findings

This article investigates the feasibility of improving Locust's HTTP request performance by replacing urllib3 with PycURL, explores protocol extensions, examines the impact of gevent's monkey patching, and concludes that the substitution does not yield significant gains despite a modest single‑user speedup.

HTTPLocustPython
0 likes · 4 min read
Optimizing Locust HTTP Requests with PycURL: Experiments and Findings