Skip to content

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Apr 9, 2025

This PR fixes a build error on Android because pthread_cancel is not implemented in Bionic, the library Google uses for Android that implements parts of C like pthread (thanks to @sogaiu for bringing this to my attention). This PR uses signals for Android as a workaround.

@bakpakin
Copy link
Member

Looks good to me. As far as pthread_cancel, this is why Janet doesn't really support canceling threads in the first place, as it is difficult to coordinate with threads and make sure that clean up code gets run, such as decrementing refcounts.

@bakpakin bakpakin merged commit 5ebe945 into janet-lang:master Apr 10, 2025
13 checks passed
@pyrmont pyrmont deleted the bugfix.termux-pthread_cancel branch April 11, 2025 12:24
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.

2 participants