- The McpSyncServer wraps an async server. By default, reactive
operations are scheduled on a bounded-elastic scheduler, to offload
blocking work and prevent accidental blocking of non-blocking
operations.
- With the default behavior, there will be thead ops, even in a blocking
context, which means thread-locals from the request thread will be
lost. This is inconenvient for frameworks that store state in
thread-locals.
- This commit adds the ability to avoid offloading, when the user is
sure they are executing code in a blocking environment. Work happens
in the calling thread, and thread-locals are available throughout the
execution.