Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize ipc_sync to allow threads as well; use with standalone-enc #413

Closed
wants to merge 3 commits into from

Conversation

gperciva
Copy link
Member

No description provided.

Verified

This commit was signed with the committer’s verified signature.
facundomedica Facundo Medica

Verified

This commit was signed with the committer’s verified signature.
facundomedica Facundo Medica
@gperciva gperciva changed the title Generalize ipc_sync to threads; use with standalone-enc Generalize ipc_sync to allow threads as well; use with standalone-enc Jan 13, 2025
@gperciva
Copy link
Member Author

(I'm not certain if this is a neat idea, or over-engineered madness.)

I wanted a semaphore abstraction (wait & signal) that worked with processes and threads. (POSIX semaphores aren't supported on macOS.)

We can't use ipc_sync directly in threads, because ipc_sync closes one read and write end of the pipe. So this PR omits those parts in the "threaded version" of ipc_sync.c.

(If you think this is an interesting idea but now's not the time, I'll close this PR and submit it to libcperciva in a week or two.)

@gperciva
Copy link
Member Author

On second thought, this should go to libcperciva first, with a test.

@gperciva gperciva closed this Jan 13, 2025
@gperciva gperciva deleted the use-ipc-sync branch January 13, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant