parent
6c6c9ea85d
commit
2c5c639b4e
1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
||||
# Coroutine |
||||
|
||||
**Coroutines** are lightweight, cooperative multitasking constructs that enable efficient asynchronous programming in server-side game |
||||
development. Unlike traditional threads, coroutines allow functions to be paused and resumed without blocking the entire execution |
||||
thread, making them ideal for handling game logic, networking, and AI behavior with minimal overhead. They work seamlessly with |
||||
future & promise mechanisms, simplifying concurrency management by avoiding callback hell and reducing synchronization complexity. |
||||
Coroutines are widely supported in modern languages like C++ (via `std::coroutine`), Python (`asyncio`), and Kotlin, offering game |
||||
developers an efficient way to write non-blocking code while maintaining readability and performance. |
||||
|
||||
Visit the following resources to learn more: |
||||
|
||||
- [@documentation@C++ Coroutines (cppreference)](https://en.cppreference.com/w/cpp/language/coroutines) |
||||
- [@documentation@Python Coroutines and Tasks](https://docs.python.org/3/library/asyncio-task.html) |
Loading…
Reference in new issue