Giter VIP home page Giter VIP logo

Comments (9)

sebthom avatar sebthom commented on May 28, 2024

This looks like a bug in the JVM target itself and you would need to report it directly at https://github.com/HaxeFoundation/haxe/issues. Does it work with the Java target?

from haxe-concurrent.

acarioni avatar acarioni commented on May 28, 2024

The java target is deprecated and my project can't compile with it.

from haxe-concurrent.

acarioni avatar acarioni commented on May 28, 2024

This is the issue that I opened on the haxe project.

from haxe-concurrent.

sebthom avatar sebthom commented on May 28, 2024

@acarioni can you give me a code example where the compilation fails. I am somehow not able to reproduce it.

The following compiles fine for me when using the jvm target.

import hx.concurrent.executor.Executor;

class Test {

   static final executor = Executor.create(2);

   public static function main() {
      executor.submit(function() {
         trace("hi");
      }, FIXED_RATE(100));
   }
}

from haxe-concurrent.

acarioni avatar acarioni commented on May 28, 2024

I tried hard to reproduce the issue by means of a simple example but unfortunately I wasn’t able. However I can reproduce it systematically when I compile my open source project.
In order to compile my project, you need to install a few tools (like Ant), but I can assist you if you need help.
You can find some other details in the issue thread on the haxe project.

from haxe-concurrent.

sebthom avatar sebthom commented on May 28, 2024

If you locally modify the ThreadPool.hx file and replace the occurrences of (function() { with (function():Void {, does it then work?

from haxe-concurrent.

acarioni avatar acarioni commented on May 28, 2024

I replaced the (only) occurrence of Threads.spawn(function() { with Threads.spawn(function(): Void { but I have the same error (I use hx.concurrent 5.1.3).

from haxe-concurrent.

sebthom avatar sebthom commented on May 28, 2024

Ok, then I am out of ideas. I hoped by adding the return type explicitly it may help the Haxe compiler to generate code that is compatible with the java Runnable interface. Then we have to wait that the upstream issue you reported gets resolved directly by the haxe team

from haxe-concurrent.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. If the issue is still valid, please add a respective comment to prevent this issue from being closed automatically. Thank you for your contributions.

from haxe-concurrent.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.