dispatcher_test.go 201 B

1234567891011121314151617
  1. package wkrp
  2. import (
  3. "fmt"
  4. "testing"
  5. "time"
  6. )
  7. func TestNewDispacher(t *testing.T) {
  8. d := NewDispacher(16)
  9. d.Do(func() error {
  10. time.Sleep(time.Second)
  11. fmt.Println("did")
  12. return nil
  13. })
  14. }