Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions man/mono.1
Original file line number Diff line number Diff line change
Expand Up @@ -1155,23 +1155,26 @@ If set, tells mono to attempt using native asynchronous I/O services. If not
set, a default select/poll implementation is used. Currently epoll and kqueue
are supported.
.TP
\fBMONO_THREADS_SUSPEND\fR
Selects a mechanism that Mono will use to suspend threads. May be set to
"preemptive", "coop", or "hybrid". Threads may need to be suspended by the
debugger, or using some .NET threading APIs, and most commonly when the SGen
garbage collector needs to stop all threads during a critical phase of garbage
collection. Preemptive mode is the mode that Mono has used historically, going
back to the Boehm days, where the garbage collector would run at any point and
suspend execution of all threads as required to perform a garbage collection.
The cooperative mode on the other hand requires the cooperation of all threads
to stop at a safe point. This makes for an easier to debug garbage collector.
As of Mono 4.3.0 it is a work in progress, and while it works, it has not been
used extensively. This option enables the feature and allows us to find spots
that need to be tuned for this mode of operation. Hybrid mode is a combination
of the two that retains better compatability with scenarios where Mono is
embedded in another application: threads that are running managed code or code
that comprises the Mono runtime will be cooperatively suspended, while threads
running embedder code will be preemptively suspended.
\fBMONO_THREADS_SUSPEND\fR Selects a mechanism that Mono will use to suspend
threads. May be set to "preemptive", "coop", or "hybrid". Threads may need to
be suspended by the debugger, or using some .NET threading APIs, and most
commonly when the SGen garbage collector needs to stop all threads during a
critical phase of garbage collection. Preemptive mode is the mode that Mono
has used historically, going back to the Boehm days, where the garbage
collector would run at any point and suspend execution of all threads as
required to perform a garbage collection. The cooperative mode on the other
hand requires the cooperation of all threads to stop at a safe point. This
makes for an easier to debug garbage collector and it improves the stability of
the runtime because threads are not suspended when accessing critical
resources. In scenarios where Mono is embedded in another application,
cooperative suspend requires the embedder code to follow coding guidelines in
order to cooperate with the garbage collector. Cooperative suspend in embedded
Mono is currently experimental. Hybrid mode is a combination of the two that
retains better compatability with scenarios where Mono is embedded in another
application: threads that are running managed code or code that comprises the
Mono runtime will be cooperatively suspended, while threads running embedder
code will be preemptively suspended. Hybrid suspend is the default on some
desktop platforms.

Alternatively, coop and hybrid mode can be enabled at compile time by using the
--enable-cooperative-suspend or --enable-hybrid-suspend flags, respectively,
Expand Down