pernamespaceworker.go ×6

Frontier kind: Code frontier

unlabeled · c_6a7c476b4c76

25 tests · 2997 LOC · 154 files · introduces 0 tests · 25 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges25 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
460 ranges2997 lines · 154 files · Browse complete extent
All tests (intent)
25 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 25 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/worker/pernamespaceworker.go 25 introduced LOC · 6 ranges

Open complete file

163 }
164
165 > func (wm *PerNamespaceWorkerManager) Stop() { pernamespaceworker.go
166 > if !atomic.CompareAndSwapInt32(
167 > &wm.status,
168 > common.DaemonStatusStarted,
169 > common.DaemonStatusStopped,
170 > ) {
171 return
172 }
173
174 > wm.logger.Info("", tag.LifeCycleStopping) pernamespaceworker.go
175 >
176 > wm.namespaceRegistry.UnregisterStateChangeCallback(wm)
177 > err := wm.serviceResolver.RemoveListener(fmt.Sprintf("%p", wm))
178 > if err != nil {
179 wm.logger.Error("Unable to unregister membership listener", tag.Error(err))
180 }
181 > wm.backgroundLoops.Cancel() pernamespaceworker.go
182 > wm.backgroundLoops.Wait()
183 >
184 > wm.lock.Lock()
185 > workers := expmaps.Values(wm.workers)
186 > maps.DeleteFunc(wm.workers, func(_ namespace.ID, _ *perNamespaceWorker) bool { return true })
187 > wm.lock.Unlock()
188 >
189 > for _, worker := range workers {
190 worker.stopWorkerAndResetTimer()
191 worker.cancel()
192 }
193
194 > wm.logger.Info("", tag.LifeCycleStopped) pernamespaceworker.go
195 }
196
210 for {
211 select {
212 > case <-ctx.Done(): pernamespaceworker.go
213 > return nil
214 case <-wm.membershipChangedCh:
215 wm.refreshAll()
224 for {
225 select {
226 > case <-ctx.Done(): pernamespaceworker.go
227 > return nil
228 case <-ticker.C:
229 wm.refreshAll()