Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

chunked queue for golang

License

NotificationsYou must be signed in to change notification settings

mdaliyan/bucket

Repository files navigation

example workflowCoverage StatusGo Report CardGo ReferenceLicense

bucket queues your items and sends them to your callback function in chunks.

Installation

go get github.com/mdaliyan/bucket

Usage

callback:=func(items []interface{}) {fmt.Println(items)}b,_:=bucket.New(bucket.BySize(10),callback)fori:=0;i<25;i++ {b.Push(i)}time.Sleep(time.Microsecond*100)fmt.Println(b.Len())

this Prints

[0 1 2 3 4 5 6 7 8 9][10 11 12 13 14 15 16 17 18 19]5

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp