Download Jar. Libraryless. Click here for Pure Java version (1164L/8K).
1 | !7 |
2 | |
3 | static new L<Var<Long>> vars; |
4 | |
5 | p { |
6 | int n = numberOfCores(); |
7 | print("Utilizing " + n(n, "core") + "!"); |
8 | repeat n { |
9 | final new Var<Long> v; |
10 | vars.add(v); |
11 | thread { |
12 | long n = 0; |
13 | while (licensed()) v.set(++n); |
14 | } |
15 | } |
16 | print("RUNNING :o)"); |
17 | thread { repeat with sleep 1 { print(vars); } } |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010387 |
Snippet name: | Utilize All Cores |
Eternal ID of this version: | #1010387/6 |
Text MD5: | 05fde25484a6feb30015c1126f7129db |
Transpilation MD5: | da552ffc615edd0cb63cf899e35c9235 |
Author: | stefan |
Category: | javax / |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-09-14 02:18:23 |
Source code size: | 337 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 577 / 1392 |
Version history: | 5 change(s) |
Referenced in: | [show references] |