-
Notifications
You must be signed in to change notification settings - Fork 22
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
Minor cleanup #30
Comments
These sound good to me (thanks @bansan85 !) |
This is by design. This pattern forces all callers to only pass local strings (character arrays that have not decayed into pointers). If a caller passes in a string whose source is unknown to this API that is a code-smell and likely a mistake. So i would leave this as is.
Makes sense, a PR for this would be great! 👍
This is for backward compatibility with a feature that was removed, which we may be re-introduced in the future.
In general RLBox can be thread-safe. The early prototypes in fact included support for multiple threads. It is in the roadmap to make the library fully thread-safe in the future (about 3/4th of the work for this is already done which are the parts you are seeing). |
After reading some part of the library, I noticed some minor change with ABI break.
unverified_safe_because
istemplate<size_t N>
but N is never used.Another declaration could be:
inline auto unverified_safe_because(const char *reason)
const
->static constexpr
The library is explicitly c++17. There is lots of
const int CompileErrorCode = 42;
that could be replaced bystatic constexpr int CompileErrorCode = 42;
#define helper_create_converted_field
,isFrozen
is unusedSo new declaration could be:
#define helper_create_converted_field(fieldType, fieldName)
So why there is a
std::mutex callback_lock
,RLBOX_SHARED_LOCK
,RLBOX_ACQUIRE_SHARED_GUARD
andRLBOX_ACQUIRE_UNIQUE_GUARD
? Is this a try to make a thread-safe library?Thanks,
PS: If you're fine with these changes, I can implement them.
The text was updated successfully, but these errors were encountered: