aboutsummaryrefslogtreecommitdiff
path: root/src/eco_tb.erl
blob: a74d005681d3719150483306517b017235eeb6c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-module(eco_tb).
-compile(export_all).

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]),
	_Ticker = spawn(eco_time, ticker, [Watcher, 1000, [Proc1], 3000]),
  receive
    {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.