Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/dev-pomma89'
Browse files Browse the repository at this point in the history
  • Loading branch information
pomma89 committed Sep 18, 2016
2 parents 1cd5007 + 8529cd0 commit a7e744c
Show file tree
Hide file tree
Showing 43 changed files with 899 additions and 213 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog for CodeProject.ObjectPool #

### v2.1.0 (2016-09-18) ###

* Changed default min and max size for MemoryStreamPool: 4KB min, 512KB max.
* Changed default min and max size for StringBuilderPool: 4K char min, 512K char max.
* Created two ad-hoc interfaces for specialized pools.
* BREAKING CHANGE: Moved static properties which controlled specialized pool sizes to the new interfaces.
* Updated Thrower.
* ObjectPool did not respect minimum pool size bound. Now it does.
* When min or max capacity of specialized pools is changed, pool is cleared, if necessary.

### v2.0.5 (2016-08-23) ###

* Fixed wrong name in an exception string.
Expand Down
2 changes: 1 addition & 1 deletion ObjectPool.Benchmarks/ObjectPool.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<Private>True</Private>
</Reference>
<Reference Include="PommaLabs.Thrower, Version=3.0.0.0, Culture=neutral, PublicKeyToken=2f204b7110a52060, processorArchitecture=MSIL">
<HintPath>..\packages\Thrower.3.0.1\lib\net46\PommaLabs.Thrower.dll</HintPath>
<HintPath>..\packages\Thrower.3.0.4\lib\net46\PommaLabs.Thrower.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion ObjectPool.Benchmarks/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
<package id="System.Xml.XmlDocument" version="4.0.1" targetFramework="net46" />
<package id="System.Xml.XPath" version="4.0.1" targetFramework="net46" />
<package id="System.Xml.XPath.XDocument" version="4.0.1" targetFramework="net46" />
<package id="Thrower" version="3.0.1" targetFramework="net46" />
<package id="Thrower" version="3.0.4" targetFramework="net46" />
</packages>
123 changes: 64 additions & 59 deletions ObjectPool.NuGet/Package.nuspec
Original file line number Diff line number Diff line change
@@ -1,69 +1,74 @@
<?xml version="1.0"?>

<package>
<metadata>
<id>CodeProject.ObjectPool</id>
<version>2.0.5</version>
<title>Generic and concurrent Object Pool</title>
<authors>Ofir Makmal &lt;Ofir.Makmal@gmail.com&gt;</authors>
<owners>Alessio Parma &lt;alessio.parma@gmail.com&gt;</owners>
<description>
<metadata>
<id>CodeProject.ObjectPool</id>
<version>2.1.0</version>
<title>Generic and concurrent Object Pool</title>
<authors>Ofir Makmal &lt;Ofir.Makmal@gmail.com&gt;</authors>
<owners>Alessio Parma &lt;alessio.parma@gmail.com&gt;</owners>
<description>
A generic, concurrent, portable and flexible Object Pool for the .NET Framework, completely based on the Code Project article of Ofir Makmal (http://goo.gl/4qig6T).
Library is production ready and it is successfully working in real life systems.

Original source code has been modified, in order to introduce a Parameterized Object Pool, already drafted by Ofir Makmal in the comments of the article.
Moreover, a few unit tests have been added, in order to improve code reliability, and a lot of other small changes have also been applied.
Original source code has been modified, in order to introduce a Parameterized Object Pool, already drafted by Ofir Makmal in the comments of the article.
Moreover, a few unit tests have been added, in order to improve code reliability, and a lot of other small changes have also been applied.
Of course, all modified source code is freely available at the project URL of this package.

Many thanks to Ofir Makmal for his great work.
</description>
<releaseNotes>
* Fixed wrong name in an exception string.
* Added Id and CreatedAt properties to PooledMemoryStream and PooledStringBuilder.
</releaseNotes>
<summary>
</description>
<releaseNotes>
* Changed default min and max size for MemoryStreamPool: 4KB min, 512KB max.
* Changed default min and max size for StringBuilderPool: 4K char min, 512K char max.
* Created two ad-hoc interfaces for specialized pools.
* BREAKING CHANGE: Moved static properties which controlled specialized pool sizes to the new interfaces.
* Updated Thrower.
* ObjectPool did not respect min pool size bound. Now it does.
* When min or max capacity of specialized pools is changed, pool is cleared, if necessary.
</releaseNotes>
<summary>
A generic, concurrent, portable and flexible Object Pool for the .NET Framework.
</summary>
<language>en-US</language>
<projectUrl>/~https://github.com/pomma89/ObjectPool</projectUrl>
<iconUrl>https://googledrive.com/host/0B8v0ikF4z2BiR29YQmxfSlE1Sms/Progetti/ObjectPool/logo-128.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>http://www.codeproject.com/info/cpol10.aspx</licenseUrl>
<copyright>Copyright (c) 2013 Ofir Makmal &lt;Ofir.Makmal@gmail.com&gt;</copyright>
<dependencies>
<group targetFramework="net35">
<dependency id="Thrower" version="3.0.1" />
</group>
<group targetFramework="net40">
<dependency id="Thrower" version="3.0.1" />
</group>
<group targetFramework="net45">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="Thrower" version="3.0.1" />
</group>
<group targetFramework="net46">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="Thrower" version="3.0.1" />
</group>
<group targetFramework="netstandard1.1">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="Thrower" version="3.0.1" />
</group>
<group targetFramework="netstandard1.3">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="System.Collections.NonGeneric" version="4.0.1" />
<dependency id="Thrower" version="3.0.1" />
</group>
<group targetFramework="portable-net45+win8+wp8+wpa81">
<dependency id="Thrower" version="3.0.1" />
</group>
</dependencies>
<references></references>
<frameworkAssemblies></frameworkAssemblies>
<tags>codeproject object pool concurrent generic threadsafe portable netstandard</tags>
</metadata>
<files>
<file src="lib\" target="lib" />
<file src="LICENSE.htm" target="LICENSE.htm" />
</files>
</package>
</summary>
<language>en-US</language>
<projectUrl>/~https://github.com/pomma89/ObjectPool</projectUrl>
<iconUrl>http://pomma89.altervista.org/objectpool/logo-128.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>http://www.codeproject.com/info/cpol10.aspx</licenseUrl>
<copyright>Copyright (c) 2013 Ofir Makmal &lt;Ofir.Makmal@gmail.com&gt;</copyright>
<dependencies>
<group targetFramework="net35">
<dependency id="Thrower" version="3.0.4" />
</group>
<group targetFramework="net40">
<dependency id="Thrower" version="3.0.4" />
</group>
<group targetFramework="net45">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="Thrower" version="3.0.4" />
</group>
<group targetFramework="net46">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="Thrower" version="3.0.4" />
</group>
<group targetFramework="netstandard1.1">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="Thrower" version="3.0.4" />
</group>
<group targetFramework="netstandard1.3">
<dependency id="System.Collections.Concurrent" version="4.0.12" />
<dependency id="System.Collections.NonGeneric" version="4.0.1" />
<dependency id="Thrower" version="3.0.4" />
</group>
<group targetFramework="portable-net45+win8+wp8+wpa81">
<dependency id="Thrower" version="3.0.4" />
</group>
</dependencies>
<references></references>
<frameworkAssemblies></frameworkAssemblies>
<tags>codeproject object pool concurrent generic threadsafe portable netstandard stringbuilder memorystream</tags>
</metadata>
<files>
<file src="lib\" target="lib" />
<file src="LICENSE.htm" target="LICENSE.htm" />
</files>
</package>
10 changes: 5 additions & 5 deletions ObjectPool.UnitTests/ObjectPoolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void ShouldHandleClearAfterNoUsage()

pool.Clear();

pool.ObjectsInPoolCount.ShouldBe(0);
pool.ObjectsInPoolCount.ShouldBe(pool.MinimumPoolSize);
}

[Test]
Expand All @@ -182,7 +182,7 @@ public void ShouldHandleClearAfterSomeUsage()

pool.Clear();

pool.ObjectsInPoolCount.ShouldBe(0);
pool.ObjectsInPoolCount.ShouldBe(pool.MinimumPoolSize);
}

[Test]
Expand All @@ -200,7 +200,7 @@ public void ShouldHandleClearAndThenPoolCanBeUsedAgain()
{
}

pool.ObjectsInPoolCount.ShouldBe(1);
pool.ObjectsInPoolCount.ShouldBe(pool.MinimumPoolSize);
}

[Test]
Expand Down Expand Up @@ -230,8 +230,8 @@ public void ShouldHandleClearAndThenReachMinimumSizeAtLaterUsage()
{
}

// Despite usage #B, count always be one, caused by #A.
pool.ObjectsInPoolCount.ShouldBe(1);
// Despite usage #B, count should always be fixed.
pool.ObjectsInPoolCount.ShouldBe(pool.MinimumPoolSize);
}
}
}
Loading

0 comments on commit a7e744c

Please sign in to comment.