Skip to content

Instantly share code, notes, and snippets.

View naXa777's full-sized avatar
:octocat:

Pavel naXa777

:octocat:
View GitHub Profile
@naXa777
naXa777 / ParallelProcess.java
Created December 5, 2016 14:14 — forked from tuxdna/ParallelProcess.java
ParallelProcess to simulate Producer-Consumer problem in Java
import java.util.Random;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
class Producer implements Runnable {
private static int count = 0;
private Random rg = new Random();
private BlockingQueue<Object> queue = null;
public Producer(BlockingQueue<Object> queue) {
@naXa777
naXa777 / EventManager.cs
Last active October 31, 2016 08:43 — forked from bendangelo/EventManager.cs
Unity3D C# Event Manager
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class EventManager : MonoBehaviour {
public bool LimitQueueProcesing = false;
public float QueueProcessTime = 0.0f;
private static EventManager s_Instance = null;
private Queue m_eventQueue = new Queue();