Skip to content

Prevent duplicate shared pool initialization - #52

Merged
mayuki merged 1 commit into
masterfrom
codex/single-init-shared-pool
Aug 28, 2026
Merged

Prevent duplicate shared pool initialization#52
mayuki merged 1 commit into
masterfrom
codex/single-init-shared-pool

Conversation

@mayuki

@mayuki mayuki commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • publish LogicLooperPool.Shared exactly once with Interlocked.CompareExchange
  • reject repeated initialization and dispose pools that lose a concurrent initialization race
  • use Volatile.Read when accessing the shared pool
  • add regression coverage for sequential and concurrent duplicate initialization

Testing

  • dotnet test LogicLooper.sln --nologo --no-restore (68 passed)

@mayuki
mayuki merged commit ed87115 into master Aug 28, 2026
7 checks passed
@mayuki
mayuki deleted the codex/single-init-shared-pool branch August 28, 2026 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant