ja-he / dayplan

A utility to plan and track your time.
MIT License
5 stars 1 forks source link

Use `ChannelEvents()` #19

Open ja-he opened 2 years ago

ja-he commented 2 years ago
    // ChannelEvents is an infinite loop that waits for an event and
    // channels it into the user provided channel ch.  Closing the
    // quit channel and calling the Fini method are cancellation
    // signals.  When a cancellation signal is received the method
    // returns after closing ch.
    //
    // This method should be used as a goroutine.
    //
    // NOTE: PollEvent should not be called while this method is running.
    ChannelEvents(ch chan<- Event, quit <-chan struct{})