Configuring the CCR Dispatcher

This page explains how you can alter the configuration of the CCR Dispatcher that is used by an XcoAppSpace instance, either by config string or by fluent interface.

Config String

With the config string the following options can be configured:
  • ccr.threadcount: This property allows configuring how many threads the CCR Dispatcher uses. By default the number of CCR threads is equal to the number installed CPUs, or 2 if there is only one CPU installed.
Here is an example that configures the XcoAppSpace's CCR Dispatcher to use 8 threads:
var space = new XcoAppSpace("ccr.threadcount=8");

Fluent Inferface

The fluent interface provides the method UsingCcrDispatcher(), which allows you to add your own CCR Dispatcher to the space. This could be useful if you are already using a CCR Dispatcher in your application and just want the appspace to use the same one, or if you want to define a certain thread count or other special options of the dispatcher. Here is an example:
var dispatcher = new Dispatcher(8, ThreadPriority.AboveNormal, DispatcherOptions.UseProcessorAffinity, "My Ccr Threads");
XcoAppSpace space = XcoAppSpace.Configure.UsingCcrDispatcher(dispatcher);
For more info about the options when instantiating the CCR Dispatcher see here.

Last edited Feb 22, 2010 at 1:11 PM by thomass, version 4

Comments

No comments yet.