Skip to content

Commit

Permalink
More explaination
Browse files Browse the repository at this point in the history
  • Loading branch information
tung.tq committed May 10, 2023
1 parent df9bfc5 commit 19509fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eventx.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ func cloneAndClearEvents[E any](events []E) []E {
}

// Fetch get events, if ctx is cancelled / deadline exceed then the fetch will be returned with error = ctx.Err(),
// and then it can be call again with a normal context object
// and then it can be call again with a normal context object.
// The list of events returned will never be empty when err = nil
func (s *Subscriber[E]) Fetch(ctx context.Context) ([]E, error) {
if !s.receiving {
s.core.doFetch(fetchRequest[E]{
Expand Down

0 comments on commit 19509fe

Please sign in to comment.