refactor: improve task management with xsync for concurrent access and enhance callback and subtasks handling as well as memory allocation

This commit is contained in:
yusing
2025-05-25 15:01:44 +08:00
parent ade93d49a3
commit c1221e61d4
16 changed files with 447 additions and 211 deletions

View File

@@ -44,7 +44,7 @@ func (r *StreamRoute) Start(parent task.Parent) gperr.Error {
if existing, ok := routes.Stream.Get(r.Key()); ok {
return gperr.Errorf("route already exists: from provider %s and %s", existing.ProviderName(), r.ProviderName())
}
r.task = parent.Subtask("stream." + r.Name())
r.task = parent.Subtask("stream."+r.Name(), true)
r.Stream = NewStream(r)
switch {