github.com/haraldrudell/parl@v0.4.176/if-statuser.go (about)

     1  /*
     2  © 2022–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/)
     3  ISC License
     4  */
     5  
     6  package parl
     7  
     8  import "time"
     9  
    10  type StatuserFactory interface {
    11  	NewStatuser(useStatuser bool, d time.Duration) (statuser Statuser)
    12  }
    13  
    14  /*
    15  Statuser prints threads that do not react within a specified time frame.
    16  This is useful during early multi-threaded design when it is uncertain why work
    17  is not progressing. Is it your code or their code?
    18  Once the program concludes without hung threads,
    19  Tracer is the better tool to identify issues.
    20  */
    21  type Statuser interface {
    22  	Set(status string) (statuser Statuser)
    23  	Shutdown()
    24  }