Skip to content

Conversation

lnotspotl
Copy link
Member

There are several shortcomings in the changes introduces PR1404. Specifically the use of detached threads is a potentially problematic element that could lead to data races or invalid memory accesses (i.e. accesses to already deleted chucks of memory)

This PR tries to mitigate that by introducing a new attribute to the DeviceBase and PipelineImpl classes called shouldCloseQuickly indicating that threads and other long-running methods should return as quickly as possible without sacrificing memory access safety and program correctness.

I've done extensive testing and the responsiveness of depthai-based python scripts has increased dramatically, with programs now typically reacting to keyboard interrupts within a single second as opposed to tens of seconds without the changes in this PR.

Finally, just like PR1404, this PR introduces a tiny fix where the crashdump collection timeout was set to 9000 seconds (2.5 hours). The intended unit of time in this case was presumably meant to be milliseconds.

@lnotspotl lnotspotl changed the base branch from main to develop August 26, 2025 03:40
@lnotspotl lnotspotl marked this pull request as draft August 27, 2025 15:22
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