File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -129,21 +129,21 @@ try (final AffinityLock al = AffinityLock.acquireLock()) {
129
129
----
130
130
In this example, the library will prefer a free CPU on the same Socket as the first thread, otherwise it will pick any free CPU.
131
131
132
- === Getting the thread id.
132
+ === Getting the thread id
133
133
You can get the current thread id using
134
134
[source, java]
135
135
----
136
136
137
137
int threadId = AffinitySupport.getThreadId();
138
138
----
139
- === Determining which CPU you are running on.
139
+ === Determining which CPU you are running on
140
140
You can get the current CPU being used by
141
141
[source, java]
142
142
----
143
143
144
144
int cpuId = AffinitySupport.getCpu();
145
145
----
146
- === Controlling the affinity more directly.
146
+ === Controlling the affinity more directly
147
147
The affinity of the process on start up is
148
148
[source, java]
149
149
----
@@ -223,7 +223,7 @@ try (AffinityLock lock = AffinityLock.acquireLockLastMinus(n)) {
223
223
224
224
I have the cpuId in a configuration file, how can I set it using a string?
225
225
226
- === Answer: use one of the following.
226
+ === Answer: use one of the following
227
227
228
228
[source,java]
229
229
----
You can’t perform that action at this time.
0 commit comments