Macaulay2 / Macaulay2/M2

Killing unreachable threads

Open
#3,454 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

threads
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

If I run a function which starts a number of threads and waits for them to finish, but then I interrupt the parent function, the orphaned threads continue to run and I think there's no way to cancel them.

It would be great to:

  1. when a local dictionary closes (e.g. function ends or is interrupted and control is handed back to the user) any remaining active thread objects in the local dictionary which are now inaccessible (i.e. not returned to the user) should be cancelled.
  2. there should be a way to retrieve all active threads, and a method to cancel them all.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by locating the thread implementation and existing cancellation behavior, then clarify ownership and lifetime semantics for unreachable threads and the proposed APIs. Done means the desired cancellation behavior and active-thread controls are specified and covered by tests.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.