init: web_hgcg_server 初始化提交
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package linode
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/xxjwxc/gowp/workpool"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAA(t *testing.T) {
|
||||
wp := workpool.New(100)
|
||||
for i := 0; i < 200000; i++ {
|
||||
var t = i
|
||||
wp.Do(func() error {
|
||||
fmt.Println(t)
|
||||
if t == 22 {
|
||||
return errors.New("111")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
err := wp.Wait()
|
||||
if err != nil {
|
||||
fmt.Println("fail", err)
|
||||
} else {
|
||||
fmt.Println("OK")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user