Skip to content

Commit

Permalink
Merge pull request #1 from fraczak/master
Browse files Browse the repository at this point in the history
one file lib
  • Loading branch information
edescourtis authored Mar 9, 2017
2 parents c05c7ae + 6c1c2be commit 754c93b
Show file tree
Hide file tree
Showing 20 changed files with 291 additions and 528 deletions.
7 changes: 0 additions & 7 deletions .classpath

This file was deleted.

13 changes: 13 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/Gradle__junit_junit_4_11.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions .project

This file was deleted.

37 changes: 2 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,6 @@
actor
=====

A java actor library with linked and priority queue support.
A one file java actor library.

To produce a jar file simply run ant.

package com.benbria.actor;

public class ActorExample {
public static void main(String[] args) throws InterruptedException {
Actor<String> actor = ThreadActor.spawn(new Behaviour<String>() {
@Override
public boolean receive(Actor<String> self, String msg) {
System.out.println("Got: " + msg);
return !msg.equals("stop");
}

@Override
public void exception(Actor<String> self, Exception e) {}
});

actor.send("hello");
actor.send("world");
Thread.sleep(1000);
actor.send("stop");
}
}

Output:
<pre>
Got: hello
Got: world
</pre>

License
-

MIT
This is a simplified version of <https://github.com/edescourtis/actor>
8 changes: 8 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apply plugin: 'java'
repositories {
jcenter()
}

dependencies {
testCompile 'junit:junit:4.11'
}
34 changes: 0 additions & 34 deletions build.xml

This file was deleted.

Binary file removed lib/junit-4.8.1.jar
Binary file not shown.
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'actor'
35 changes: 0 additions & 35 deletions src/com/benbria/actor/Actor.java

This file was deleted.

36 changes: 0 additions & 36 deletions src/com/benbria/actor/Behaviour.java

This file was deleted.

Loading

0 comments on commit 754c93b

Please sign in to comment.