nikcho-kouhai
nikcho-kouhai
JCHJava Community | Help. Code. Learn.
Created by SidKid on 4/5/2025 in #java-help
killing vs interrupting a Thread
Killing bad, be friends
7 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
Yeah, as I said it's simply an example.
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
And if there is I'd love to know it
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
I don't think there's an argument against "multiple threads are a pain to deal with"
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
I'm just talking in general, the JavaScript is just an example
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
It's no coincidence JavaScript runs an event loop and is single threaded
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
In any case, threads are a pain. My advice is to avoid them like the plague when possible
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
And it can't do that unless the back end provides some endpoint to do so
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
There's no way the front end would know the progress unless it can query it in some way
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
The folder is on the backend, its something like a file server
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
Yeah, another example might be something like an asynchronous operation with progress updates in your back end. I had such a case recently. An HTTP request to request a folder copy from one location to another. What you might do is start a thread to perform the copy and return an address to query the progress of the copy.
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
Just pick some full stack project you find interesting and make it. That's the best way to actually learn something
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
Or whatever other language that can transpile to JavaScript
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
If you want it to be in the browser its probably gonna have to be JavaScript or typescript
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
You can write the front end in whatever
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
I suppose you can try to make an http server that provides some service
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
Well I suppose for full stack you should probably learn the front end
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
I'd suggest you simply learn to get a sense for when its necessary to use multiple threads
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
It adds a pretty big layer of complexity to your project
42 replies
JCHJava Community | Help. Code. Learn.
Created by Deorteur7 on 3/8/2025 in #java-help
Guidance for multithreading
Honestly unless you really need it there's hardly a reason to use it
42 replies