teavm icon indicating copy to clipboard operation
teavm copied to clipboard

Support for ConcurrentLinkedQueue

Open varunsingh87 opened this issue 11 months ago • 2 comments

Is there a plan to support the ConcurrentLinkedQueue class in the future? Perhaps something like this npm package.

ConcurrentLinkedQueue is the only class that makes teavm incompatible with socket.io. Other websocket libraries have many other Java classes that are not emulated by teavm.

varunsingh87 avatar Mar 14 '24 21:03 varunsingh87

There's a plan to support ConcurrentLinkedQueue eventually, but there are no terms for that. I believe, this is an important feature for actual or potential TeaVM users, but there are plenty of such features, and I'm trying to guess (according to my own experience and feedback) what is more important right now. So if you really need ConcurrentLinkedQueue implementation and this is a show-stopper, you can try to motivate me to change my plans. You can try to convince me, that you are determined to create socket.io port for TeaVM and that this is going to make a lot of buzz around TeaVM and bring more users to it. Or you can become a sponsor. Anyway, my personal opinion that you don't need socket.io client for Java ported to JavaScript, because it was not written for this target with its specifics. I suggest that you write a socket.io TeaVM client, without the need in ConcurrentLinkedQueue and threads at all (just rely on JS event queue).

konsoletyper avatar Mar 15 '24 16:03 konsoletyper

I appreciate your quick response. I may write a socketio-teavm JavaScript-Java wrapper as a workaround for this issue. If ConcurrentLinkedQueue works with socket.io, teavm becomes applicable to real-time multiplayer games and many other applications that use websockets. I would contribute this feature to teavm, but I don’t know have any knowledge of networking or compilers.

varunsingh87 avatar Mar 16 '24 13:03 varunsingh87