From dda45ad2b1a1a47ee9f560209468411e0ece3253 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Tue, 8 Apr 2025 03:06:36 +0200 Subject: [PATCH 1/5] Clarify CookieContainer thread-safety --- xml/System.Net/CookieContainer.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xml/System.Net/CookieContainer.xml b/xml/System.Net/CookieContainer.xml index b100c661b97..14565bf87ac 100644 --- a/xml/System.Net/CookieContainer.xml +++ b/xml/System.Net/CookieContainer.xml @@ -79,6 +79,20 @@ ]]> + + instances to/from a are thread-safe and may be used concurrently from multiple threads. + + > [!NOTE] + > Regardless of thread-safety, unanticipated sharing of may lead to issues when working with and or . + > One such problem is isolation: parts of the application that not intended to share cookies may inadvertently do so. + > It is not recommended to use cookies together with . + + ]]> + From b3f9a0097d4fc04805873839c1bcd677aed43391 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Tue, 8 Apr 2025 03:12:14 +0200 Subject: [PATCH 2/5] better text --- xml/System.Net/CookieContainer.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xml/System.Net/CookieContainer.xml b/xml/System.Net/CookieContainer.xml index 14565bf87ac..757fc99f8bf 100644 --- a/xml/System.Net/CookieContainer.xml +++ b/xml/System.Net/CookieContainer.xml @@ -87,8 +87,7 @@ The methods for adding and retrieving instances to/from a are thread-safe and may be used concurrently from multiple threads. > [!NOTE] - > Regardless of thread-safety, unanticipated sharing of may lead to issues when working with and or . - > One such problem is isolation: parts of the application that not intended to share cookies may inadvertently do so. + > Regardless of thread-safety, unanticipated sharing of instances may lead to issues when working with and or , since parts of the application that not intended to share cookies may inadvertently do so. > It is not recommended to use cookies together with . ]]> From 26d016ed733a133adb182aacd15d886a780a7f20 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Tue, 8 Apr 2025 22:45:09 +0200 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Net/CookieContainer.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Net/CookieContainer.xml b/xml/System.Net/CookieContainer.xml index 757fc99f8bf..945d4f1281c 100644 --- a/xml/System.Net/CookieContainer.xml +++ b/xml/System.Net/CookieContainer.xml @@ -84,10 +84,10 @@ ## Thread Safety - The methods for adding and retrieving instances to/from a are thread-safe and may be used concurrently from multiple threads. + The methods for adding and retrieving instances to and from a are thread-safe and can be used concurrently from multiple threads. > [!NOTE] - > Regardless of thread-safety, unanticipated sharing of instances may lead to issues when working with and or , since parts of the application that not intended to share cookies may inadvertently do so. + > Regardless of thread-safety, unanticipated sharing of instances can lead to issues when working with and or , since parts of the application that aren't intended to share cookies might inadvertently do so. > It is not recommended to use cookies together with . ]]> From 5d2c10c582ca53c9b45f062a46f0c036257aedd6 Mon Sep 17 00:00:00 2001 From: antonfirsov Date: Wed, 23 Apr 2025 00:12:04 +0200 Subject: [PATCH 4/5] Use remarks section only --- xml/System.Net/CookieContainer.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/xml/System.Net/CookieContainer.xml b/xml/System.Net/CookieContainer.xml index 945d4f1281c..2dc9bea12fe 100644 --- a/xml/System.Net/CookieContainer.xml +++ b/xml/System.Net/CookieContainer.xml @@ -77,11 +77,6 @@ The has three properties that govern the volume of the content of the container: , , and . These values have the default settings of 300, 4096, and 20 respectively. When a is added to the container, these properties are used to determine whether a already contained in the should be discarded to make room for the new one. The keeps track of each addition to ensure that neither the nor the limits are exceeded. If one or both are exceeded, then instances held by the are removed. First, any expired is removed. If further capacity must be recaptured, then the least-recently used is purged. - ]]> - - - instances to and from a are thread-safe and can be used concurrently from multiple threads. @@ -91,7 +86,7 @@ > It is not recommended to use cookies together with . ]]> - + From d6fac13e4c690ab625ed4cd84621313aef66c37d Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Wed, 23 Apr 2025 15:26:14 +0200 Subject: [PATCH 5/5] Update xml/System.Net/CookieContainer.xml --- xml/System.Net/CookieContainer.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Net/CookieContainer.xml b/xml/System.Net/CookieContainer.xml index 2dc9bea12fe..76bf26cfa53 100644 --- a/xml/System.Net/CookieContainer.xml +++ b/xml/System.Net/CookieContainer.xml @@ -82,7 +82,7 @@ The methods for adding and retrieving instances to and from a are thread-safe and can be used concurrently from multiple threads. > [!NOTE] - > Regardless of thread-safety, unanticipated sharing of instances can lead to issues when working with and or , since parts of the application that aren't intended to share cookies might inadvertently do so. + > Regardless of thread-safety, unanticipated sharing of instances can lead to issues when working with and or , since parts of the application that aren't intended to share cookies with each other might inadvertently do so. > It is not recommended to use cookies together with . ]]>