From 6366b41c9ed633a975bf37527f97c29efe2a1da5 Mon Sep 17 00:00:00 2001 From: Nathan Lasseter Date: Fri, 30 May 2014 13:44:47 +0100 Subject: Updated Makefile to take tb as argument --- src/eco_tb.erl | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/eco_tb.erl b/src/eco_tb.erl index 82119f6..a74d005 100644 --- a/src/eco_tb.erl +++ b/src/eco_tb.erl @@ -1,7 +1,7 @@ -module(eco_tb). --export([start/0]). +-compile(export_all). -start() -> +oneprocsixtickdeath() -> Watcher = spawn(eco_watcher, watcher, [self()]), Pool = spawn(eco_pool, start_pool, [[1,1,1]]), Proc1 = spawn(eco_proc, proc, [Watcher, [1], [], Pool, 3, 3]), @@ -10,3 +10,14 @@ start() -> {error, notock, _, _} -> init:stop() end. + +twoprocsbackandforth() -> + Watcher = spawn(eco_watcher, watcher, [self()]), + Pool = spawn(eco_pool, start_pool, [[1,2]]), + Proc1 = spawn(eco_proc, proc, [Watcher, [1], [2], Pool, 3, 3]), + Proc2 = spawn(eco_proc, proc, [Watcher, [2], [1], Pool, 3, 3]), + _Ticker = spawn(eco_time, ticker, [Watcher, 1000, [Proc1, Proc2], 3000]), + receive + {error, notock, _, _} -> + init:stop() + end. -- cgit v1.2.1