// Path: src/main/java/com/plexobject/rx/Disposable.java
// public interface Disposable {
//     /**
//      * This method is called to dispose the object for clean up
//      */
//     void dispose();
// }


import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.plexobject.rx.Disposable;
package com.plexobject.rx.scheduler;




/**
 * This implementation of scheduler uses same thread to notify subscriber. This
 * should not be used for large data as it doesn't allow user to unsubscribe.
 * 
 * @author Shahzad Bhatti
 *
 */
public class ImmediateScheduler implements Scheduler, Disposable {
    private static final Logger logger = LoggerFactory
            .getLogger(ImmediateScheduler.class);

    private volatile boolean shutdown;

    @Override
    public void dispose() {
// Path: src/main/java/com/plexobject/rx/Disposable.java
// public interface Disposable {
//     /**
//      * This method is called to dispose the object for clean up
//      */
//     void dispose();
// }


// Path: src/main/java/com/plexobject/rx/scheduler/ImmediateScheduler.java
import java.util.function.Consumer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.plexobject.rx.Disposable;

package com.plexobject.rx.scheduler;




/**
 * This implementation of scheduler uses same thread to notify subscriber. This
 * should not be used for large data as it doesn't allow user to unsubscribe.
 * 
 * @author Shahzad Bhatti
 *
 */
public class ImmediateScheduler implements Scheduler, Disposable {
    private static final Logger logger = LoggerFactory
            .getLogger(ImmediateScheduler.class);

    private volatile boolean shutdown;

    @Override
    public void dispose() {
        shutdown = true;