~/talk

Schedgroup: a Timer-Based Goroutine Concurrency Primitive

Talkat GopherCon Europe 2020 · 2020-06-15..06-18· [concurrency]
slides:none on file

Introduces schedgroup, a Go package that schedules goroutines by time and supports context cancellation, evolving from three prototypes: one timer per goroutine, timer-polling with a min-heap, and an event-driven monitor with one time.Timer and container/heap. Uses channels, select, non-blocking notify, and time.Timer to spawn goroutines on demand; in a benchmark scheduling 1,000,000 tasks it reduces parked goroutines from ~1,000,000 to 3 and cuts heap memory ~6×, and the final design runs in production.

AI-written summary · about

  1. 0:00Start
  2. 7:38manage a central timer
  3. 11:36push a new task onto the heap
  4. 12:44wait for context cancellation or for addition of a new task
  5. 16:39examine the in use heap space
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.