-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to specify scheduler implementation in configuration #994
Changes from 6 commits
1b076d3
fc7c859
43c39d1
14c26f1
6e84075
600a82c
e219f1a
f47a609
b1a65b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,9 +53,9 @@ public ActorSystemImpl(string name, Config config) | |
|
||
_name = name; | ||
ConfigureSettings(config); | ||
ConfigureScheduler(); | ||
ConfigureEventStream(); | ||
ConfigureProvider(); | ||
ConfigureScheduler(); | ||
ConfigureSerialization(); | ||
ConfigureMailboxes(); | ||
ConfigureDispatchers(); | ||
|
@@ -127,7 +127,8 @@ public override ActorSelection ActorSelection(string actorPath) | |
|
||
private void ConfigureScheduler() | ||
{ | ||
_scheduler = new DedicatedThreadScheduler(this);;// new TaskBasedScheduler(); | ||
var schedulerType = Type.GetType(_settings.SchedulerClass, true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. throw/log if scheduler type resolves to null as this would break the entire system There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mmm @rogeralsing the logger is not initialized until the system is Started, and that is too late to be able to log the scheduler failure. It will throw if it cannot create the scheduler so the system should not start, it will just not log. |
||
_scheduler = (IScheduler) Activator.CreateInstance(schedulerType, this); | ||
} | ||
|
||
/// <summary> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the problem, the scheduler needs to be configured after the provider so the dedicated thread scheduler can access the provider