Thorinwasher
Thorinwasher
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/17/2025 in #java-help
How to get built jar during test-time (JUnit)
Thanks for answering by the way!
13 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/17/2025 in #java-help
How to get built jar during test-time (JUnit)
Alright, I guess that's the only real way to offer compatibility with all build systems. I think I will still try to make a gradle plugin for this. It would make life easier for at least gradle devs
13 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/17/2025 in #java-help
How to get built jar during test-time (JUnit)
Yes, that's one way of doing it, I would rather have a copy paste solution for this though, as it makes the project easier to use The more I think about it, the more I think a Gradle plugin that moves the compiled JAR to a predefined location is a better idea.
13 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/12/2025 in #java-help
How to access generic info on class
Seems like this has solved my issue on that, so I will close this thread (Some other issue has surfaced now though which I have not thought about 😿 ) Thanks for the help by the way!
19 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/12/2025 in #java-help
How to access generic info on class
That's very true, I will try and use these and if it works, I will close this.
19 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/12/2025 in #java-help
How to access generic info on class
Wow, thanks. I feel stupid now. It's literally been right there all the time 🤦‍♂️
19 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 1/12/2025 in #java-help
How to access generic info on class
Oh... it's that easy...
19 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 11/13/2024 in #java-help
How to find generics when running a java process
So to clarify, every method in the mirror API will kind of look like this, all autogenerated with the same method names as the API it is based out of:
public String toString() {
return MirrorHandler.handle("toString", this);
}
public String toString() {
return MirrorHandler.handle("toString", this);
}
MirrorHandler does network processing
6 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 11/13/2024 in #java-help
How to find generics when running a java process
Other than that, I can just say that it's meant to be an integration testing library where you run the process on a docker container, and then have a mirror instance of the API for the process that you can use like the original library, where every method call just does some networking and such to communicate with the containerized process using reflection and that API. Most definitely a stupid idea, but at least interesting, which is why I'm pursuing it at the moment
6 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Yes, that's how I want it to be
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
That might partly fix the issue, does still require the thread to be interupted though
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Oh... that's stupid on my end. I just thought it threw an exception :facepalm:
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
I think I know what's happening now. I made a disable queue item and an enable queue item. These items sets the value of asyncQueueThreadIsEnabled to true or false. It's a way to avoid dealing with concurrency issues. Now to the actual issue this is how I'm cycling through the queue:
do {
try {
Runnable runnable = asyncQueue.take();
runnable.run();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (Exception e) {
Stargate.log(e);
}
} while (asyncQueueThreadIsEnabled || !asyncQueue.isEmpty());
do {
try {
Runnable runnable = asyncQueue.take();
runnable.run();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
} catch (Exception e) {
Stargate.log(e);
}
} while (asyncQueueThreadIsEnabled || !asyncQueue.isEmpty());
If per say the last item would be a enable queue item in the queue. Then the boolean switch asyncQueueThreadIsEnabled would be true, therefore blocking the thread in the next BlockingQueue#take() call.
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Okay. (need to eat some dinner first)
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
(Like my main fallback has just been to let external classes handle this. But in this case, I think I need to get better at concurency)
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Alright, thanks
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
(Your recomendation here will definitely help, thanks btw)
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Alright, btw do you have a good source I can read up on concurrency?
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Let's see, good idea to check that
53 replies
JCHJava Community | Help. Code. Learn.
Created by Thorinwasher on 9/21/2024 in #java-help
Asyncronous task queue
Yeah. Might be a good idea
53 replies