Skip to content

fix: Campus.run() double-stop with context manager #20

Closed

Description

@branben

What to build

When using with Campus(...) as c: c.run(), start() is called in __enter__, then run() calls start() again (double start), and stop() is called in finally then again in __exit__.

Add an idempotency guard: if self._running: return at the top of start(), or remove the start() call from run().

Acceptance criteria

  • Context manager + run() lifecycle is idempotent
  • Tests verify single start/stop cycle

Blocked by

None - can start immediately

Parent

Tracks the campus framework v1 code review: #27

Activity

  1. branben commented on Oct 6, 2026

    @branben
    OwnerAuthor

    Closing: code referenced in this issue no longer exists (campus framework removed) or fix already applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions