Explore >> Select a destination


You are here

bruceeckel.com
| | www.stackchief.com
0.8 parsecs away

Travel
| | Java multithreading examples including two ways of multithreading, good examples, avoiding deadlock, and how many threads can run.
| | boyter.org
2.2 parsecs away

Travel
| | [AI summary] This blog post compares the performance of Java and Go when processing large files, highlighting the challenges Java faces with memory-mapped files and the efficiency of Go's concurrency model. The author tests various implementations, including a Java solution with threads and queues, and finds that Go's approach is faster, though Java can be optimized with batch processing and efficient queue implementations. The post concludes that for optimal large file processing, Go is more suitable, but Java can still be competitive with the right techniques.
| | www.craigpardey.com
2.4 parsecs away

Travel
| | Spring 3.2 has some very nice features for scheduling tasks. The pure Java way of doing this looks something like private ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); class ScheduledTask implements Runnable { @Override public void run() { System.out.println("Running scheduled task"); } } // Schedule a task every 5 seconds executor.scheduleAtFixedRate(new ScheduledTask(), 1, 5, TimeUnit.SECONDS); // If you don't do this then the JVM won't exit cleanly executor.shutdown(); But now, with the snazzy new Spring scheduling annotations, it can be as simple as this
| | aras-p.info
28.3 parsecs away

Travel
|