boost.png (6897 bytes) Home Libraries People FAQ More

Next

Chapter 1. Boost.Coroutine

Giovanni P. Deretta

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt )

Table of Contents

Introduction
Tutorial
Generators
Example: the producer/consumer pattern
Stackful generators: Same fringe problem
Coroutines
Multitasking
Waiting for events
Advanced concepts
Introduction
Symmetric coroutines
Finite state machines
Events
Events: Boost.Asio
Coroutines and thread safety
Design Rationale
Further Development
Details
Supported platforms
Performance
Implementation
Case study 1: Win32 Fibers
Case study 2: Linux-x86-GCC
Interaction between coroutines and threads
Acknowledgments
Bibliography

Introduction

The Boost.Coroutine library contains a family of class templates that wrap function objects in coroutines. Coroutines are a generalization of subroutines that can return and be reentered more than once without causing the destruction of automatic objects.

Coroutines are useful whenever it is necessary to keep state across a function call, a job usually reserved to stateful function objects.

This library has been developed as part of the Google Summer of Code 2006, with Boost as the Mentoring association. It has not been subject to a formal review, and thus is not part of the Boost library collection. Boost.Coroutine is only the tentative name

]

Last revised: August 20, 2006 at 15:04:07 GMT


Next