This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Server { | |
public static void main(String[] args) { | |
try { | |
Executor pool = Executors.newCachedThreadPool(); | |
ChannelFactory factory = | |
new NioServerSocketChannelFactory( | |
pool, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test { | |
classpath 'build/classes/main' | |
systemProperty 'vertx.test.timeout', 15 | |
systemProperty 'vertx.mods', "$projectDir/build/tmp/mod-test" | |
systemProperty 'vertx.version', "$project.version" | |
testLogging.showStandardStreams = true | |
} | |
Gives error: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2011 the original author or authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void cleanUpJythonMess() { | |
try { | |
//Jython stores a reference to the system state on a thread local, when the system state is closed | |
//Jython does not remove the TL so... hey presto a leak | |
//The only way we can remove it is to use reflection to manually remove the tl entry | |
//Nice huh!? | |
//See https://github.com/vert-x/vert.x/issues/417 for more info | |
//Also http://bugs.jython.org/issue1327 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tim $ java -cp ./classes:. kilim.examples.Chain 10 | |
Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 68 in method kilim.Task.invoke(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;Lkilim/Fiber;)Ljava/lang/Object; at offset 16 | |
at java.lang.Class.getDeclaredMethods0(Native Method) | |
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442) | |
at java.lang.Class.getMethod0(Class.java:2685) | |
at java.lang.Class.getMethod(Class.java:1620) | |
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:484) | |
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:476) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No daemon- | |
tim $ time ./mk vertx-testsuite:test -Dtest.single=JavaScriptIncludeTest | |
:vertx-core:compileJava UP-TO-DATE | |
:vertx-core:processResources UP-TO-DATE | |
:vertx-core:classes UP-TO-DATE | |
:vertx-core:jar UP-TO-DATE | |
:vertx-platform:compileJava | |
:vertx-platform:processResources UP-TO-DATE | |
:vertx-platform:classes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ModA | |
class SomeClass | |
end | |
end | |
Module.new do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ModA | |
class SomeClass | |
end | |
end | |
module ModB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "vertx" | |
Vertx::EventBus.register_handler('test.address') do |message| | |
puts "Executing on thread #{java.lang.Thread.currentThread}" | |
100.times do |i| | |
puts "count is #{i}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "vertx" | |
Vertx.deploy_verticle('concurrent.rb', nil, 10) | |
msg = { | |
"foo" => "bar", | |
"quux" => "wibble" | |
} | |
Vertx.set_periodic(1) { |