Skip to content

Commit

Permalink
context docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hongchao Deng committed Jan 21, 2015
1 parent f9a21ce commit 1d75ca8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ func (f *framework) run() {
if meta.epoch != f.epoch {
break
}
// We need to create a context before handling next event. The context saves
// the epoch that was meant for this event. This context will be passed
// to user event handler functions and used to ask framework to do work later
// with previous information.
go f.handleMetaChange(f.createCtx(), meta.who, meta.from, meta.meta)
case req := <-f.dataReqtoSendChan:
if req.epoch != f.epoch {
Expand Down

0 comments on commit 1d75ca8

Please sign in to comment.