engine: Rewrite the core algorithm
The engine core had some unfortunate bugs that were the result of some early design errors when I wasn't as familiar with channels. I've finally rewritten most of the bad parts, and I think it's much more logical and stable now. This also simplifies the resource API, since more of the work is done completely in the engine, and hidden from view. Lastly, this adds a few new metaparameters and associated code. There are still some open problems left to solve, but hopefully this brings us one step closer.
This commit is contained in:
@@ -647,8 +647,10 @@ func (obj *Main) Run() error {
|
||||
|
||||
// Start needs to be synchronous because we don't want
|
||||
// to loop around and cause a pause before we unpaused.
|
||||
if err := obj.ge.Start(); err != nil { // sync
|
||||
Logf("error starting graph: %+v", err)
|
||||
// Commit already starts things, but we still need to
|
||||
// resume anything that was pre-existing and was paused.
|
||||
if err := obj.ge.Resume(); err != nil { // sync
|
||||
Logf("error resuming graph: %+v", err)
|
||||
continue
|
||||
}
|
||||
converger.Resume() // after Start()
|
||||
|
||||
Reference in New Issue
Block a user