diff --git a/gql_test.go b/gql_test.go index 19602d3..a166acf 100644 --- a/gql_test.go +++ b/gql_test.go @@ -31,7 +31,7 @@ func TestGQLDB(t * testing.T) { NewGroupExt(nil)) ctx.Log.Logf("test", "GQL_ID: %s", gql.ID) - err = gql.Signal(ctx, gql.ID, StopSignal) + err = ctx.Send(gql.ID, gql.ID, StopSignal) fatalErr(t, err) (*GraphTester)(t).WaitForStatus(ctx, listener_ext.Chan, "stopped", 100*time.Millisecond, "Didn't receive stopped on listener") @@ -47,7 +47,7 @@ func TestGQLDB(t * testing.T) { fatalErr(t, err) listener_ext, err = GetExt[*ListenerExt](gql_loaded) fatalErr(t, err) - err = gql_loaded.Signal(ctx, gql_loaded.ID, StopSignal) + err = ctx.Send(gql_loaded.ID, gql_loaded.ID, StopSignal) fatalErr(t, err) (*GraphTester)(t).WaitForStatus(ctx, listener_ext.Chan, "stopped", 100*time.Millisecond, "Didn't receive stopped on update_channel_2") diff --git a/lockable.go b/lockable.go index d046b59..321895f 100644 --- a/lockable.go +++ b/lockable.go @@ -93,7 +93,7 @@ func (ext *LockableExt) Process(ctx *Context, source NodeID, node *Node, signal case Up: owner_sent := false for _, dependency := range(ext.Dependencies) { - err := node.Signal(ctx, dependency, signal) + err := ctx.Send(node.ID, dependency, signal) if err != nil { ctx.Log.Logf("signal", "LOCKABLE_SIGNAL_ERR: %s->%s - %e", node.ID, dependency, err) } @@ -107,7 +107,7 @@ func (ext *LockableExt) Process(ctx *Context, source NodeID, node *Node, signal if ext.Owner != nil && owner_sent == false { if *ext.Owner != node.ID { - err := node.Signal(ctx, *ext.Owner, signal) + err := ctx.Send(node.ID, *ext.Owner, signal) if err != nil { ctx.Log.Logf("signal", "LOCKABLE_SIGNAL_ERR: %s->%s - %e", node.ID, *ext.Owner, err) } @@ -115,7 +115,7 @@ func (ext *LockableExt) Process(ctx *Context, source NodeID, node *Node, signal } case Down: for _, requirement := range(ext.Requirements) { - err := node.Signal(ctx, requirement, signal) + err := ctx.Send(node.ID, requirement, signal) if err != nil { ctx.Log.Logf("signal", "LOCKABLE_SIGNAL_ERR: %s->%s - %e", node.ID, requirement, err) } diff --git a/node.go b/node.go index 0244499..2289283 100644 --- a/node.go +++ b/node.go @@ -189,10 +189,6 @@ func (node *Node) Process(ctx *Context, source NodeID, signal Signal) { } } -func (node *Node) Signal(ctx *Context, dest NodeID, signal Signal) error { - return ctx.Send(node.ID, dest, signal) -} - func GetCtx[T Extension, C any](ctx *Context) (C, error) { var zero T var zero_ctx C