Working with threads

Thread API

mono_thread_abort_all_other_threads
Prototype: mono_thread_abort_all_other_threads

mono_thread_attach
Prototype: mono_thread_attach

mono_thread_create
Prototype: mono_thread_create

mono_thread_current
Prototype: mono_thread_current

mono_thread_detach
Prototype: mono_thread_detach

mono_thread_exit
Prototype: mono_thread_exit

mono_thread_force_interruption_checkpoint
Prototype: mono_thread_force_interruption_checkpoint

mono_thread_get_abort_signal
Prototype: mono_thread_get_abort_signal

mono_thread_get_pending_exception
Prototype: mono_thread_get_pending_exception

mono_thread_interruption_checkpoint
Prototype: mono_thread_interruption_checkpoint

mono_thread_interruption_requested
Prototype: mono_thread_interruption_requested

mono_thread_interruption_request_flag
gint32* mono_thread_interruption_request_flag ()

Remarks

Returns the address of a flag that will be non-zero if an interruption has been requested for a thread. The thread to interrupt may not be the current thread, so an additional call to mono_thread_interruption_requested() or mono_thread_interruption_checkpoint() is allways needed if the flag is not zero.

mono_thread_manage
Prototype: mono_thread_manage

mono_thread_new_init
Prototype: mono_thread_new_init

mono_thread_pop_appdomain_ref
Prototype: mono_thread_pop_appdomain_ref

mono_thread_push_appdomain_ref
Prototype: mono_thread_push_appdomain_ref

mono_thread_request_interruption
Prototype: mono_thread_request_interruption

mono_threads_abort_appdomain_threads
Prototype: mono_threads_abort_appdomain_threads

mono_threads_get_default_stacksize
Prototype: mono_threads_get_default_stacksize

mono_threads_install_cleanup
Prototype: mono_threads_install_cleanup

mono_threads_set_default_stacksize
Prototype: mono_threads_set_default_stacksize

mono_thread_stop
Prototype: mono_thread_stop

mono_thread_get_main
Prototype: mono_thread_get_main

mono_thread_set_main
void mono_thread_set_main (MonoThread *thread)

Parameters

thread:
thread to set as the main thread
Remarks

This function can be used to instruct the runtime to treat thread as the main thread, ie, the thread that would normally execute the Main() method. This basically means that at the end of thread, the runtime will wait for the existing foreground threads to quit and other such details.

mono_thread_get_tls_key
Prototype: mono_thread_get_tls_key

mono_pthread_key_for_tls
Prototype: mono_pthread_key_for_tls

Thread Pool API

mono_thread_pool_add
Prototype: mono_thread_pool_add

mono_thread_pool_finish
Prototype: mono_thread_pool_finish

Monitors

mono_monitor_enter
Prototype: mono_monitor_enter

mono_monitor_exit
Prototype: mono_monitor_exit

mono_monitor_try_enter
Prototype: mono_monitor_try_enter

Mono VM development

mono_threads_clear_cached_culture
Prototype: mono_threads_clear_cached_culture

mono_thread_suspend_all_other_threads
Prototype: mono_thread_suspend_all_other_threads