context.go ×3

Frontier kind: Code frontier

unlabeled · c_f5aea84f1a58

16 tests · 47 LOC · 2 files · introduces 0 tests · 15 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges15 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
13 ranges47 lines · 2 files · Browse complete extent
All tests (intent)
16 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.

Introduced files, introduced tests, and structurally relevant concept specializationTestPerKeyRateLimit · 0 introduced LOCTestPerKeyRateLimitTestPerKeyRateLimitRecycleWakesBlockedMatch · 0 introduced LOCTestPerKeyRateLimitRecyc…ratelimit_manager.go ×1 · 2 introduced LOCratelimit_manager.go ×1TestPerKeyRateLimitDoesNotBlockOtherKeys · 0 introduced LOCTestPerKeyRateLimitDoesN…TestRateLimitedBacklog · 0 introduced LOCTestRateLimitedBacklogratelimit_manager.go ×4 · 30 introduced LOCratelimit_manager.go ×4matcher_data.go ×1 · 5 introduced LOCmatcher_data.go ×1TestPollForwardFailed · 0 introduced LOCTestPollForwardFailedTestPollForwardSuccess · 0 introduced LOCTestPollForwardSuccessmatcher_data.go ×1 · 3 introduced LOCmatcher_data.go ×1TestQueryForwardResponse · 0 introduced LOCTestQueryForwardResponseTestTaskForward · 0 introduced LOCTestTaskForwardTestQuery · 0 introduced LOCTestQueryTestQueryForwardError · 0 introduced LOCTestQueryForwardErrorTestQueryForwardNil · 0 introduced LOCTestQueryForwardNilTestOrder · 0 introduced LOCTestOrderbatcher.go ×4 · 18 introduced LOCbatcher.go ×4batcher.go ×1 · 3 introduced LOCbatcher.go ×1context.go ×1 · 2 introduced LOCcontext.go ×1context.go ×1 · 5 introduced LOCcontext.go ×1TestContextWithTimeout_Canceled · 0 introduced LOCTestContextWithTimeout_C…context.go ×1 · 3 introduced LOCcontext.go ×1context.go ×1 · 4 introduced LOCcontext.go ×1context.go ×1 · 7 introduced LOCcontext.go ×1context.go ×1 · 3 introduced LOCcontext.go ×1event_time_source.go ×2 · 5 introduced LOCevent_time_source.go ×2event_time_source.go ×1 · 3 introduced LOCevent_time_source.go ×1event_time_source.go ×3 · 9 introduced LOCevent_time_source.go ×3event_time_source.go ×2 · 4 introduced LOCevent_time_source.go ×2event_time_source.go ×1 · 6 introduced LOCevent_time_source.go ×1event_time_source.go ×1 · 5 introduced LOCevent_time_source.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/common/clock/context.go · 74 LOCclock/context.gogo.temporal.io/server/common/clock/event_time_source.go · 221 LOCclock/event_time_source.…go.temporal.io/server/common/stream_batcher/batcher.go · 154 LOCstream_batcher/batcher.g…go.temporal.io/server/service/matching/matcher_data.go · 740 LOCmatching/matcher_data.gogo.temporal.io/server/service/matching/ratelimit_manager.go · 394 LOCmatching/ratelimit_manag…TestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestContextWithTimeout_Canceled · introduced test · go.temporal.io/server/common/clock/TestContextWithTimeout_CanceledTestContextWithTimeout_C…TestContextWithTimeout_Fire · introduced test · go.temporal.io/server/common/clock/TestContextWithTimeout_FireTestContextWithTimeout_F…TestStreamBatcher_AddTimeout · introduced test · go.temporal.io/server/common/stream_batcher/TestStreamBatcher_AddTimeoutTestStreamBatcher_AddTim…TestStreamBatcher_Random · introduced test · go.temporal.io/server/common/stream_batcher/TestStreamBatcher_RandomTestStreamBatcher_RandomTestOrder · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestOrderTestOrderTestPerKeyRateLimit · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestPerKeyRateLimitTestPerKeyRateLimitTestPerKeyRateLimitDoesNotBlockOtherKeys · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestPerKeyRateLimitDoesNotBlockOtherKeysTestPerKeyRateLimitDoesN…TestPerKeyRateLimitRecycleWakesBlockedMatch · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestPerKeyRateLimitRecycleWakesBlockedMatchTestPerKeyRateLimitRecyc…TestPollForwardFailed · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestPollForwardFailedTestPollForwardFailedTestPollForwardSuccess · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestPollForwardSuccessTestPollForwardSuccessTestQuery · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestQueryTestQueryTestQueryForwardError · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestQueryForwardErrorTestQueryForwardErrorTestQueryForwardNil · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestQueryForwardNilTestQueryForwardNilTestQueryForwardResponse · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestQueryForwardResponseTestQueryForwardResponseTestRateLimitedBacklog · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestRateLimitedBacklogTestRateLimitedBacklogTestTaskForward · introduced test · go.temporal.io/server/service/matching/TestMatcherDataSuite/TestTaskForwardTestTaskForwardFocused concept · context.go ×3 · 15 introduced LOCcontext.go ×3

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: 15 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/clock/context.go 15 introduced LOC · 3 ranges

Open complete file

40 }
41
42 > func (ctx *ctxWithDeadline) cancel() { context.go
43 > ctx.once.Do(func() {
44 // We'd like to call ctx.timer.Stop() here, but we can't: the time source may call
45 // deadlineExceeded while holding its lock, which acquires the once mutex. Here we have
55 deadline time.Time,
56 timeSource TimeSource,
57 > ) (context.Context, context.CancelFunc) { context.go
58 > ctxd := &ctxWithDeadline{
59 > Context: ctx,
60 > deadline: deadline,
61 > done: make(chan struct{}),
62 > }
63 > timer := timeSource.AfterFunc(deadline.Sub(timeSource.Now()), ctxd.deadlineExceeded)
64 > ctxd.timer = timer
65 > return ctxd, ctxd.cancel
66 > }
67
68 func ContextWithTimeout(
70 timeout time.Duration,
71 timeSource TimeSource,
72 > ) (context.Context, context.CancelFunc) { context.go
73 > return ContextWithDeadline(ctx, timeSource.Now().Add(timeout), timeSource)
74 > }