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

Consider @ThreadSafe when importing Java types #129

Open
ktoso opened this issue Oct 28, 2024 · 1 comment
Open

Consider @ThreadSafe when importing Java types #129

ktoso opened this issue Oct 28, 2024 · 1 comment

Comments

@ktoso
Copy link
Collaborator

ktoso commented Oct 28, 2024

While "dormant" some project do use the JSR-305 annotations, and one of them is https://www.javadoc.io/doc/com.google.code.findbugs/jsr305/latest/javax/annotation/concurrent/ThreadSafe.html

This is something we could use to annotate such imported Java types as Sendable.

Others are:

Name Description
GuardedBy The field or method to which this annotation is applied can only be accessed when holding a particular lock, which may be a built-in (synchronization) lock, or may be an explicit Lock.
Immutable The class to which this annotation is applied is immutable.
NotThreadSafe The class to which this annotation is applied is not thread-safe.
ThreadSafe The class to which this annotation is applied is thread-safe.
@lhoward
Copy link
Contributor

lhoward commented Nov 8, 2024

also see #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants