-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
60 lines (45 loc) · 1.24 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
defmodule ElixirDiningPhilosophers.Mixfile do
use Mix.Project
def project do
[ app: :elixir_dining_philosophers,
version: "0.0.1",
deps: deps ]
end
# Configuration for the OTP application
def application do
[]
end
# Returns the list of dependencies in the format:
# { :foobar, "0.1", git: "https://github.com/elixir-lang/foobar.git" }
defp deps do
[]
end
end
defmodule Mix.Tasks.Start do
@shortdoc "use mix start.deadlock | start.nolock | start.starving"
@moduledoc "use mix start.deadlock | start.nolock | start.starving"
def run(_) do
IO.puts "use mix start.deadlock | start.nolock | start.starving"
end
defmodule Starving do
use Mix.Task
@shortdoc "start up the starving scenario"
def run(_) do
Mix.Task.run("run", ["ElixirDiningPhilosophers.starving_scenario()"])
end
end
defmodule Deadlock do
use Mix.Task
@shortdoc "start up the dead locking scenario"
def run(_) do
Mix.Task.run("run", ["ElixirDiningPhilosophers.dead_locking_scenario()"])
end
end
defmodule Nolock do
use Mix.Task
@shortdoc "start up the non locking scenario"
def run(_) do
Mix.Task.run("run", ["ElixirDiningPhilosophers.non_locking"])
end
end
end