Skip to content

Commit 04e31df

Browse files
committed
s_disptach_queue_threads -> s_dispatch_queue_threads
1 parent b6e66af commit 04e31df

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/native/crt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ struct aws_allocator *aws_jni_get_allocator(void) {
5858
Dispatch queue threads are handled differently than other types as we do not create and manage them. This is set during
5959
creation of an Event Loop Group to control attach/detach to/from JVM behavior of threads.
6060
*/
61-
static bool s_disptach_queue_threads = false;
61+
static bool s_dispatch_queue_threads = false;
6262
void aws_jni_set_dispatch_queue_threads(bool is_dispatch_queue) {
63-
s_disptach_queue_threads = is_dispatch_queue;
63+
s_dispatch_queue_threads = is_dispatch_queue;
6464
}
6565

6666
static void s_detach_jvm_from_thread(void *user_data) {
@@ -84,7 +84,7 @@ static JNIEnv *s_aws_jni_get_thread_env(JavaVM *jvm) {
8484
void *env = NULL;
8585
#endif
8686
if ((*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_6) == JNI_EDETACHED) {
87-
if (!s_disptach_queue_threads) {
87+
if (!s_dispatch_queue_threads) {
8888
AWS_LOGF_DEBUG(AWS_LS_COMMON_GENERAL, "s_aws_jni_get_thread_env returned detached, attaching");
8989
}
9090

@@ -124,7 +124,7 @@ static JNIEnv *s_aws_jni_get_thread_env(JavaVM *jvm) {
124124
Dispatch Queue threads are managed by Apple's GCD and thus can't have an at_exit callback assigned. We manually
125125
detatch dispatch queue threads from the JVM during `aws_jni_release_thread_env()` to insure cleanup.
126126
*/
127-
if (!s_disptach_queue_threads) {
127+
if (!s_dispatch_queue_threads) {
128128
/* This should only happen in event loop threads, the JVM main thread attachment is
129129
* managed by the JVM, so we only need to clean up event loop thread attachments */
130130
AWS_FATAL_ASSERT(AWS_OP_SUCCESS == aws_thread_current_at_exit(s_detach_jvm_from_thread, (void *)jvm));
@@ -261,7 +261,7 @@ void aws_jni_release_thread_env(JavaVM *jvm, JNIEnv *env) {
261261
on a thread exit callback due to the threads not being managed by the CRT and thus, their
262262
lifetimes not trackable outside the context of their immediate use.
263263
*/
264-
if (s_disptach_queue_threads) {
264+
if (s_dispatch_queue_threads) {
265265
(*jvm)->DetachCurrentThread(jvm);
266266
}
267267

0 commit comments

Comments
 (0)