Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > TinyBrain | #1006506 - numberOfCores - get number of cores in current computer

JavaX fragment (include)

static volatile int numberOfCores_value;

static int numberOfCores() {
  if (numberOfCores_value == 0)
    numberOfCores_value = Runtime.getRuntime().availableProcessors();
  ret numberOfCores_value;
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1006506
Snippet name: numberOfCores - get number of cores in current computer
Eternal ID of this version: #1006506/2
Text MD5: 74f3a73f3d43051d0b521f7bef1bd018
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-14 02:19:52
Source code size: 207 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 61 / 58
Version history: 1 change(s)
Referenced in: [show]