Commit Graph

5 Commits

Author SHA1 Message Date
Raphael S. Carvalho
f6fdde0ff6 core: make gate_closed_exception::what a public member
gate_closed_exception::what() is currently a private member, thus
calling the method when handling the exception isn't possible.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-07-06 10:25:21 +03:00
Glauber Costa
a4a23f8eb0 gate: introduce with_gate idiom
Execute a function making sure it is wrapped in a gate.

This can afford to be considerably simpler than do_with, since we are not
playing any games with object creation, and the gate itself can be assumed to
be relatively long lived.

Among other things, this will allow us to make changes to enter / leave without
breaking existing code, and experiment with stronger ways of doing leave - as
Avi suggested recently.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-05 19:07:08 +03:00
Avi Kivity
18fd73b065 gate: fix doc typo 2015-06-21 20:36:15 +03:00
Avi Kivity
a2ec5ebe87 doc: add gate class to fiber module 2015-06-21 20:35:54 +03:00
Avi Kivity
6595ad0bde core: introduce gate class
Gate allows stopping new incoming requests, and detecting when the last
in-progress request has left.
2015-06-19 19:03:15 +03:00