delight-concurrency

An abstract and lightweight definition of concurrency fundamentals.

License

License

GPL
GroupId

GroupId

org.javadelight
ArtifactId

ArtifactId

delight-concurrency
Last Version

Last Version

0.0.6
Release Date

Release Date

Type

Type

bundle
Description

Description

delight-concurrency
An abstract and lightweight definition of concurrency fundamentals.
Project URL

Project URL

https://github.com/javadelight/delight-concurrency
Source Code Management

Source Code Management

https://github.com/javadelight/delight-concurrency

Download delight-concurrency

Dependencies

compile (2)

Group / Artifact Type Version
org.javadelight : delight-async jar 0.1.5
org.javadelight : delight-factories jar 0.0.3

provided (1)

Group / Artifact Type Version
com.google.gwt : gwt-user jar 2.8.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.7

Project Modules

There are no modules declared in this project.

Build Status

delight-concurrency

Abstract concurrency API for Java applications based on vanilla Java.

This library is particularly useful when threads and thread-safe objects are used in code which is shared between GWT and JRE environments.

Part of Java Delight.

Usage

Initialize concurrency instance.

Concurrency concurrency = ConcurrencyJre.create();

Create an atomic Integer:

SimpleAtomicInteger = concurrency.newAtomicInteger(0);

Create a collection:

List<String> list = concurreny.newCollection().newThreadSafeList(String);

Create an executor:

SimpleExecutor executor = concurrency.newExecutor().newParallelExecutor(5, this);

executor.execute(new Runnable() {
  ...
});

executor.shutdown(new SimpleCallback() {
			
	@Override
	public void onFailure(Throwable t) {
		throw new RuntimeException(t);
	}
	
	@Override
	public void onSuccess() {
		// all done
	}
});

Maven Dependency

<dependency>
    <groupId>org.javadelight</groupId>
	<artifactId>delight-concurrency</artifactId>
	<version>[latest version]</version>
</dependency>

This artifact is available on Maven Central and BinTray.

Maven Central

Links

Versions

Version
0.0.6