Moved validate check down (fixed error creator not set)

master
Alexander B 5 years ago
parent f78e00ffdc
commit bce2ae2c3a

@ -62,13 +62,13 @@ namespace eu.railduction.netcore.dll.ManagedPool
this.increaseBuffer = increaseBuffer; this.increaseBuffer = increaseBuffer;
this.decreaseBuffer = decreaseBuffer; this.decreaseBuffer = decreaseBuffer;
// Validate objects state
validate();
this.creator = creator; this.creator = creator;
this.destructor = destructor; this.destructor = destructor;
this.healthChecker = healthChecker; this.healthChecker = healthChecker;
// Validate objects state
validate();
// Create the minimum amount of objects // Create the minimum amount of objects
Task.Run(() => createNewObjects(min)); Task.Run(() => createNewObjects(min));
} }

Loading…
Cancel
Save