Skip to content

Commit

Permalink
Removing all locks and synchronized collections
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaud committed Dec 17, 2019
1 parent 06c4434 commit 7c2458a
Show file tree
Hide file tree
Showing 39 changed files with 1,607 additions and 4,324 deletions.
12 changes: 6 additions & 6 deletions main/apiplugins/io.sarl.core/src/io/sarl/core/bic.sarl
Expand Up @@ -25,6 +25,8 @@ import java.util.UUID
import java.util.concurrent.TimeUnit
import java.util.logging.Logger
import java.util.function.Supplier
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentSkipListSet;

import io.sarl.core.AgentTask
import io.sarl.lang.core.Address
Expand All @@ -37,8 +39,6 @@ import io.sarl.lang.core.EventSpace
import io.sarl.lang.core.Scope
import io.sarl.lang.core.Space
import io.sarl.lang.core.SpaceID
import io.sarl.lang.util.SynchronizedSet
import io.sarl.lang.util.SynchronizedIterable

/**
* Provides functions for accessing and managing the external contexts of an agent.
Expand All @@ -51,7 +51,7 @@ capacity ExternalContextAccess {
* @return the list of the agent contexts.
*/
@Pure
def getAllContexts : SynchronizedIterable<AgentContext>
def getAllContexts : ConcurrentLinkedDeque<AgentContext>

/**
* Replies the AgentContext for the given ID.
Expand Down Expand Up @@ -226,7 +226,7 @@ capacity InnerContextAccess {
* @return the identifiers of the members of the internal context of the current agent.
*/
@Pure
def getMemberAgents : SynchronizedIterable<UUID>
def getMemberAgents : ConcurrentSkipListSet<UUID>

/** Replies if the given space is the default space of the inner context.
*
Expand Down Expand Up @@ -294,7 +294,7 @@ capacity Behaviors {
* @return the unmodifiable collection of the registered behavior.
* @since 0.5
*/
def getRegisteredBehaviors : SynchronizedIterable<Behavior>
def getRegisteredBehaviors : ConcurrentLinkedDeque<Behavior>

/**
* Register a Behavior for the owner agent.
Expand Down Expand Up @@ -502,7 +502,7 @@ capacity Schedules {
* @return the names of the active tasks.
* @since 0.5
*/
def getActiveTasks : SynchronizedSet<String>
def getActiveTasks : ConcurrentSkipListSet<String>

/**
* Schedule a given task to be executed after the specified delay.
Expand Down
2 changes: 1 addition & 1 deletion main/apiplugins/io.sarl.core/src/io/sarl/core/events.sarl
Expand Up @@ -27,7 +27,7 @@ import java.util.UUID
import io.sarl.lang.^annotation.EarlyExit
import io.sarl.lang.core.SpaceID
import io.sarl.lang.core.Address
import io.sarl.util.concurrent.Collections3
import io.sarl.util.Collections3;

/**
* Initialization event.
Expand Down
3 changes: 1 addition & 2 deletions main/apiplugins/io.sarl.util/META-INF/MANIFEST.MF
Expand Up @@ -8,8 +8,7 @@ Bundle-Name: %Bundle-Name
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: io.sarl.eventdispatching,
io.sarl.sarlspecification,
io.sarl.util,
io.sarl.util.concurrent
io.sarl.util
Require-Bundle: io.sarl.lang.core;bundle-version="0.11.0";visibility:=reexport,
org.eclipse.osgi;bundle-version="3.15.0",
com.google.inject;bundle-version="4.1.0",
Expand Down

0 comments on commit 7c2458a

Please sign in to comment.