Skip to content

Allow use of semaphore posting with noexcept - #263

Closed
yrashk wants to merge 1 commit into
boostorg:developfrom
omnigres:semaphore-post-nothrow
Closed

yrashk wants to merge 1 commit into
boostorg:developfrom
omnigres:semaphore-post-nothrow

Conversation

@yrashk

@yrashk yrashk commented Apr 24, 2025 •

Copy link
Copy Markdown

Addresses a concern in #262


Please note that this the first draft/prototype and I have no expertise with Windows (nor did I check this on Windows yet). Any advice appreciated.

@yrashk

yrashk commented May 4, 2025

Copy link
Copy Markdown
Author

ping @igaztanaga – bumping this PR to see if there's interest in this change

@yrashk

yrashk commented Jul 10, 2025

Copy link
Copy Markdown
Author

Hi @igaztanaga – wondering if you're interested in this direction? Thank you!

@igaztanaga

Copy link
Copy Markdown
Member

Adding std::error to a few functions is not a direction I would like to follow, it would make the library design inconsistent and half-baked.

Changing the general error handling of the library (or supporting exceptions+error codes) is a big task. The C++ standard uses exceptions for error signalling and probably some users would prefer using boost::system error_codes, so I don't see a clear path forward.

@igaztanaga igaztanaga closed this Aug 25, 2025
@yrashk

yrashk commented Aug 25, 2025

Copy link
Copy Markdown
Author

Thank you.

My main concern is that exceptions in semaphore posting break use of this in signals – which should otherwise be safe, if they didn't use exceptions. This is why I proposed this additional API.

I wonder if you'd be interested in exploring how #262 can be solved? I'd be happy to iterate on an actual solution.

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