-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from fraczak/master
one file lib
- Loading branch information
Showing
20 changed files
with
291 additions
and
528 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
.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.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = 'actor' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.