projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[threads] Ensure thread is still alive when detaching it
[mono.git]
/
mono
/
metadata
/
threads.c
diff --git
a/mono/metadata/threads.c
b/mono/metadata/threads.c
index d874b5664c753ac83209ae3d8b9f7f46ccdfa8a0..fd424bdfb90ca00d66a27b7c722c9f3dda8eee3d 100644
(file)
--- a/
mono/metadata/threads.c
+++ b/
mono/metadata/threads.c
@@
-1086,6
+1086,8
@@
mono_thread_detach_internal (MonoInternalThread *thread)
if (mono_thread_cleanup_fn)
mono_thread_cleanup_fn (thread_get_tid (thread));
+ mono_memory_barrier ();
+
if (mono_gc_is_moving ()) {
MONO_GC_UNREGISTER_ROOT (thread->thread_pinning_ref);
thread->thread_pinning_ref = NULL;