File: ParallelOptions.xml

package info (click to toggle)
mono 4.6.2.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 778,148 kB
  • ctags: 914,052
  • sloc: cs: 5,779,509; xml: 2,773,713; ansic: 432,645; sh: 14,749; makefile: 12,361; perl: 2,488; python: 1,434; cpp: 849; asm: 531; sql: 95; sed: 16; php: 1
file content (118 lines) | stat: -rw-r--r-- 7,756 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ParallelOptions" FullName="System.Threading.Tasks.ParallelOptions">
  <TypeSignature Language="C#" Value="public class ParallelOptions" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ParallelOptions extends System.Object" />
  <AssemblyInfo>
    <AssemblyName>mscorlib</AssemblyName>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <remarks>To be added.</remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Stores options that configure the operation of methods on the <see cref="T:System.Threading.Tasks.Parallel" /> class.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public ParallelOptions ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>This constructor initializes the instance with default values. <see cref="P:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism" /> is initialized to -1, signifying that there is no upper bound set on how much parallelism should be employed. <see cref="P:System.Threading.Tasks.ParallelOptions.CancellationToken" /> is initialized to a non-cancelable token, and <see cref="P:System.Threading.Tasks.ParallelOptions.TaskScheduler" /> is initialized to the default scheduler (TaskScheduler.Default). </para>
          <para> All of these defaults may be overwritten using the property set accessors on the instance.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Initializes a new instance of the <see cref="T:System.Threading.Tasks.ParallelOptions" /> class.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="CancellationToken">
      <MemberSignature Language="C#" Value="public System.Threading.CancellationToken CancellationToken { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance valuetype System.Threading.CancellationToken CancellationToken" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Threading.CancellationToken</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Providing a <see cref="T:System.Threading.CancellationToken" /> to a <see cref="T:System.Threading.Tasks.Parallel" /> method enables the operation to be exited early. Code external to the operation may cancel the token, and if the operation observes the token being set, it may exit early by throwing an <see cref="T:System.OperationCanceledException" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the <see cref="T:System.Threading.CancellationToken" /> associated with this <see cref="T:System.Threading.Tasks.ParallelOptions" /> instance.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="MaxDegreeOfParallelism">
      <MemberSignature Language="C#" Value="public int MaxDegreeOfParallelism { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance int32 MaxDegreeOfParallelism" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Int32</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If the <see cref="P:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism" /> property is positive, it limits the number of concurrent operations run by <see cref="T:System.Threading.Tasks.Parallel" /> method calls that are passed this <see cref="T:System.Threading.Tasks.ParallelOptions" /> instance to the set value. If it is -1,  there is no limit on the number of concurrently running operations.</para>
          <para>By default, <see cref="Overload:System.Threading.Tasks.Parallel.For" /> and <see cref="Overload:System.Threading.Tasks.Parallel.ForEach" /> will utilize however many threads the underlying scheduler provides, so changing <see cref="P:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism" /> from the default only limits how many concurrent tasks will be used. </para>
          <para>Ordinarily, you do not need to modify this setting. However, you may choose to set it explicitly in advanced usage scenarios such as the following: , Or, if </para>
          <list type="bullet">
            <item>
              <para>You know that a particular algorithm you're using won't scale beyond a certain number of cores. You can set the property to avoid wasting cycles on additional cores. </para>
            </item>
            <item>
              <para>You're running multiple algorithms concurrently and want to manually define how much of the system each can utilize. You can set a <see cref="P:System.Threading.Tasks.ParallelOptions.MaxDegreeOfParallelism" /> value for each.</para>
            </item>
            <item>
              <para>For certain workloads, the thread pool's heuristics may be unable to determine the right number of threads to use and could end up injecting too many threads. For example, in long-running loop body iterations, the thread pool may not be able to tell the difference between reasonable progress or livelock or deadlock, and may not be able to reclaim threads added to improve performance. In this case, you can set the property to ensure that you don't use more than a reasonable number of threads. </para>
            </item>
          </list>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the maximum degree of parallelism enabled by this <see cref="T:System.Threading.Tasks.ParallelOptions" /> instance.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="TaskScheduler">
      <MemberSignature Language="C#" Value="public System.Threading.Tasks.TaskScheduler TaskScheduler { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property instance class System.Threading.Tasks.TaskScheduler TaskScheduler" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Threading.Tasks.TaskScheduler</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the <see cref="T:System.Threading.Tasks.TaskScheduler" /> associated with this <see cref="T:System.Threading.Tasks.ParallelOptions" /> instance. Setting this property to null indicates that the current scheduler should be used.</para>
        </summary>
      </Docs>
    </Member>
  </Members>
</Type>