Skip to content

Commit 22a972e

Browse files
authored
Merge pull request #463 from NotSoFancyName/dbus-methods-status-channel-comment
dbus: Add a comment about result channel behaviour
2 parents ed3a911 + 9c151e5 commit 22a972e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dbus/methods.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ func (c *Conn) StartUnit(name string, mode string, ch chan<- string) (int, error
102102
// has been removed too. skipped indicates that a job was skipped because it
103103
// didn't apply to the units current state.
104104
//
105+
// Important: It is the caller's responsibility to unblock the provided channel write,
106+
// either by reading from the channel or by using a buffered channel. Until the write
107+
// is unblocked, the Conn object cannot handle other jobs.
108+
//
105109
// If no error occurs, the ID of the underlying systemd job will be returned. There
106110
// does exist the possibility for no error to be returned, but for the returned job
107111
// ID to be 0. In this case, the actual underlying ID is not 0 and this datapoint

0 commit comments

Comments
 (0)