| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Etc/ |
Upload File : |
U:RDoc::AnyMethod[iI"nprocessors:ETI"Etc::nprocessors;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"-Returns the number of online processors.;To:RDoc::Markup::BlankLine o; ; [I":The result is intended as the number of processes to ;TI""use all available processors.;T@o; ; [I"&This method is implemented using:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"sched_getaffinity(): Linux;To;;0; [o; ; [I"rsysconf(_SC_NPROCESSORS_ONLN): GNU/Linux, NetBSD, FreeBSD, OpenBSD, DragonFly BSD, OpenIndiana, Mac OS X, AIX;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"require 'etc' ;TI"p Etc.nprocessors #=> 4 ;T:@format0o; ; [I"PThe result might be smaller number than physical cpus especially when ruby ;TI"Lprocess is bound to specific cpus. This is intended for getting better ;TI"parallel processing.;T@o; ; [I"Example: (Linux);T@o;; [I"Blinux$ taskset 0x3 ./ruby -retc -e "p Etc.nprocessors" #=> 2;T;0: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@4FI"Etc;TcRDoc::NormalModule00