当前位置: 首页 > news >正文

品牌网站设计企业服务建筑建设规范网站

品牌网站设计企业服务,建筑建设规范网站,科学做视频网站,如何把自己做的网站发布到网上创建EventLoopGroup使用无参构造方法时#xff0c;发现会创建24个NioEventLoop#xff08;readonlyChildren.size24#xff09;,经查#xff0c;是取的java虚拟机的可用处理器数2倍。源码如下#xff1a; 重点就是最后哪个方法的注释#xff1a;Returns the number of p…创建EventLoopGroup使用无参构造方法时发现会创建24个NioEventLoopreadonlyChildren.size24,经查是取的java虚拟机的可用处理器数2倍。源码如下 重点就是最后哪个方法的注释Returns the number of processors available to the Java virtual machine.(返回Java虚拟机可用的处理器数。) /*** see MultithreadEventExecutorGroup#MultithreadEventExecutorGroup(int, Executor, Object...)*/protected MultithreadEventLoopGroup(int nThreads, Executor executor, Object... args) {//如果没指定线程数则取默认的DEFAULT_EVENT_LOOP_THREADS super(nThreads 0 ? DEFAULT_EVENT_LOOP_THREADS : nThreads, executor, args);}private static final int DEFAULT_EVENT_LOOP_THREADS;static {//核心逻辑就是看NettyRuntime.availableProcessors() * 2DEFAULT_EVENT_LOOP_THREADS Math.max(1, SystemPropertyUtil.getInt(io.netty.eventLoopThreads, NettyRuntime.availableProcessors() * 2));if (logger.isDebugEnabled()) {logger.debug(-Dio.netty.eventLoopThreads: {}, DEFAULT_EVENT_LOOP_THREADS);}}/*** Get the configured number of available processors. The default is {link Runtime#availableProcessors()}.* This can be overridden by setting the system property io.netty.availableProcessors or by invoking* {link #setAvailableProcessors(int)} before any calls to this method.** return the configured number of available processors*/SuppressForbidden(reason to obtain default number of available processors)synchronized int availableProcessors() {//如果availableProcessors 0还未设置过就取Runtime.getRuntime().availableProcessors()if (this.availableProcessors 0) {final int availableProcessors SystemPropertyUtil.getInt(io.netty.availableProcessors,Runtime.getRuntime().availableProcessors());setAvailableProcessors(availableProcessors);}return this.availableProcessors;}}/*** Returns the number of processors available to the Java virtual machine.** p This value may change during a particular invocation of the virtual* machine. Applications that are sensitive to the number of available* processors should therefore occasionally poll this property and adjust* their resource usage appropriately. /p** return the maximum number of processors available to the virtual* machine; never smaller than one* since 1.4*/public native int availableProcessors();
http://www.yutouwan.com/news/434439/

相关文章:

  • 电子商务网站开发岗位工商局网站怎么做股东实名认证
  • 宜昌网站建设开发费用北京朝阳区二手房出售
  • 周至做网站的公司做销售用什么网站
  • 电商和网站设计哪个好互联网经营许可证
  • 国外做婚纱摄影店设计的网站建站技术知识
  • 网站设计公司种类长沙做网站需要多少钱
  • 免费的公司网站怎么做建设网站需要哪些条件
  • 南宁建站模板展示app系统软件开发
  • 网站后台图片并排怎么做成都网站建设 赢展
  • 把网站做成app沙洋建设局网站
  • 国外调色教程网站广州专业制作网站
  • 哈尔滨网站设计哪家公司好手机百度2020
  • 建设网站的步骤知乎展厅室内设计公司
  • 公司网站网页设计下载wordpress 4.8.1
  • 广告设计网站建设怎么做汕头seo代理商
  • 网站注册和进入asp关键词数据
  • 网站域名年龄网站开发百度百科
  • wordpress用户发文网络营销推广seo
  • 大学生期末作业建设网站营销策划咨询机构
  • 网站开发设计过程商丘网吧什么时候恢复营业
  • 做设计下素材有比较好的网站公司介绍模板图片
  • 网站建设的品牌双鸭山住房和城乡建设局网站
  • 海南网站建设公司drupal joomla wordpress 带后台管理
  • 版纳网站建设seo自学教程seo免费教程
  • python自学网站睢县做网站的公司
  • 蓝韵网络专业网站建设怎么样学校网站设计及代码
  • 旅游网站建设的目标是什么意思罗山网站建设
  • 国外做储物柜的网站网络规划与设计实训报告
  • 作图在线制作专业seo优化推广
  • 一流的网站建设哪家好电商网站开发分析