Skip to content

Commit 4ec08db

Browse files
committed
Added PR feedback with ThreadSafe annotation
1 parent d1d73fa commit 4ec08db

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎src/main/java/graphql/GraphQLContext.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
* You can set this up via {@link ExecutionInput.Builder#context(graphql.GraphQLContext.Builder)}
2828
*/
2929
@PublicApi
30+
@ThreadSafe
3031
@SuppressWarnings("unchecked")
3132
public class GraphQLContext {
3233

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package graphql;
2+
3+
import java.lang.annotation.Documented;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
import java.lang.annotation.Target;
7+
8+
import static java.lang.annotation.ElementType.CONSTRUCTOR;
9+
import static java.lang.annotation.ElementType.METHOD;
10+
import static java.lang.annotation.ElementType.TYPE;
11+
12+
/**
13+
* This represents code that is known to be mutable but thread safe.
14+
*/
15+
@Retention(RetentionPolicy.RUNTIME)
16+
@Target(value = {CONSTRUCTOR, METHOD, TYPE})
17+
@Documented
18+
public @interface ThreadSafe {
19+
}

0 commit comments

Comments
 (0)