Skip to content

Ensure WireframeServer::new enforces minimum worker count of at least 1 #12

@coderabbitai

Description

@coderabbitai

Summary

WireframeServer::new currently determines the default worker count with num_cpus::get() but no longer applies .max(1). On platforms that may return 0, this could leave the server without any worker tasks. The workers() setter, however, does apply .max(1).

This issue tracks reinstating the minimum-of-one safeguard in the constructor so behaviour is consistent across both code paths.

Please note in the documentation that the default worker count is determined by the number of CPU cores.

Context

Acceptance Criteria

  • WireframeServer::new guarantees at least one worker by applying .max(1) (or equivalent logic).
  • Appropriate test(s) cover the zero-CPU edge case, where feasible.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions