Skip to content

Commit 879350a

Browse files
committed
[go docs] Add information on which go-routine operation is run
1 parent ff85cd0 commit 879350a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

batch.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ func (s Options[Resource]) withDefaults() Options[Resource] {
9393
// If there is no pending batch then the new batch will be started and will run for at least MinDuration. After the
9494
// MinDuration no new operations will be accepted and SaveResource function will be called.
9595
//
96-
// Operations are run sequentially. No manual locking is required inside operation. Operation should be fast, which
97-
// basically means that any I/O should be avoided at all cost.
96+
// Operations are run sequentially. No manual synchronization is required inside operation. Operation should be fast, which
97+
// basically means that any I/O should be avoided at all cost. Operations (together with LoadResource and SaveResource)
98+
// are run on a batch dedicated go-routine.
9899
//
99100
// Operation must leave Resource in a consistent state, so the next operation in batch can be executed on the same resource.
100101
// When operation cannot be executed because some conditions are not met then operation should not change the state

0 commit comments

Comments
 (0)