我给出了一个问题来演示使用Single和Multithread执行函数的基准。 我在这做吗?如果是,我怎么能不使用Join()。 如果不是,建议我。
代码
Time taken for Main thread: 44
Time taken for other threads: 10
输出
ERROR JSSESocketFactory - Failed to load keystore type JKS with path C:\Users\user\AppData\Local\Temp\tomcat.5953177593073698207.443\file:/D:/workspace-spring/project/keystore.jks due to C:\Users\user\AppData\Local\Temp\tomcat.5953177593073698207.443\file:\D:\workspace-spring\project\keystore.jks (The filename, directory name, or volume label syntax is incorrect)
java.io.FileNotFoundException: C:\Users\user\AppData\Local\Temp\tomcat.5953177593073698207.443\file:\D:\workspace-spring\project\keystore.jks (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method) ~[na:1.6.0_45]
at java.io.FileInputStream.<init>(FileInputStream.java:120) ~[na:1.6.0_45]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getStore(JSSESocketFactory.java:413) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeystore(JSSESocketFactory.java:319) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:577) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:517) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:493) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:653) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:449) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1007) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:241) [tomcat-embed-core-7.0.59.jar:7.0.59]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:194) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:151) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) [spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1112) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1101) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at biz.tfsystem.questionnaire.manager.Application.main(Application.java:32) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-1.3.0.RELEASE.jar:1.3.0.RELEASE]