coreos/fleet — pull request #393 by bcwaldon (2014-05-03 21:52:32+00:00)
Title: fix(agent): Lock AgentState in event handlers

Access to the AgentState object by the Agent event
handlers must be done in a transaction. Locking from
the event handlers themselves gets us this. This cuts
down on mis-scheduling of jobs since Agents are no
longer dealing with a racy view of their state when
bidding on Jobs.