Skip to content

Instantly share code, notes, and snippets.

View mjruggiero's full-sized avatar

Matthew Ruggiero mjruggiero

  • N/A
  • Portsmouth, RI
View GitHub Profile
@mjruggiero
mjruggiero / README-Template.md
Created June 12, 2021 01:00 — forked from DomPizzie/README-Template.md
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

@mjruggiero
mjruggiero / CallbackB.java
Created August 20, 2017 13:46 — forked from benjchristensen/CallbackB.java
CallbackB.java Example of using Callbacks for nested calls showing the incidental complexity that results and how eventually the asynchronous paths need to be synchronized together.
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
public class CallbackB {
/**
@mjruggiero
mjruggiero / FuturesB.java
Created August 20, 2017 13:44 — forked from benjchristensen/FuturesB.java
FuturesB.java Example of using Futures for nested calls showing how it blocks inefficiently.
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;