Actions

Difference between revisions of "Boostcon 2011"

From Just in Time

Line 18: Line 18:
 
* Threads
 
* Threads
 
* ?
 
* ?
 +
 +
===Object lifetimes===
 +
handlers and buffers are taken by value, a copy is made. Buffers are shallow.
 +
 +
Arguments taken by non-const reference: caller needs to guarantee lifetime.
 +
'''this'''-pointer should outlive operation.
 +
Newby problem: providing a buffer that goes out of scope (local variable for instance).

Revision as of 15:46, 16 May 2011

This page will contain my notes taken during Boostcon 2011

Library in a Week

Review tools

  • Code Collaborator
  • Crucible (Crubicle?)

Boost.Asio

Chris Kohlhoff

fundamental concepts that went into the library. Use them in your programs.

One key criterium: should not be a framework, but a toolkit. This gives you more freedom.

io_service
"your channel into the operationg system"

Challenges of asynchronous programming:

  • Object lifetimes
  • Thinking asynchronously
  • Threads
  • ?

Object lifetimes

handlers and buffers are taken by value, a copy is made. Buffers are shallow.

Arguments taken by non-const reference: caller needs to guarantee lifetime. this-pointer should outlive operation. Newby problem: providing a buffer that goes out of scope (local variable for instance).