Skip to content

Commit

Permalink
[core] By default, space listeners are strong listeners.
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Galland <galland@arakhne.org>
  • Loading branch information
gallandarakhneorg committed Mar 20, 2020
1 parent bb61d3b commit 0b2f660
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Expand Up @@ -54,12 +54,12 @@ interface OpenEventSpace extends EventSpace {
* @param participant the participant to register.
* @param weakParticipant indicates to the space that the given participant could be considered as a weak participant.
* A Weak participant will not prevent the space from begin destroyed if it is the only one staying in it, a Strong participant will prevent the space destruction.
* A space containing only Weak participants will be destroyed by the SRE Kernel
* A space containing only Weak participants will be destroyed by the SRE Kernel. The default value is {@ode false}.
* @return the entity's address in this space
* @fires ParticipantJoined in its enclosing Context default space.
* @since 0.11
*/
def register(participant : EventListener, weakParticipant : boolean = true) : Address fires ParticipantJoined
def register(participant : EventListener, weakParticipant : boolean = false) : Address fires ParticipantJoined

/**
* Unregisters the entity inside this space.
Expand Down
Expand Up @@ -666,7 +666,6 @@ class SreRunContext {
def waitForAgentKilled(identifiers : UUID[], ^space : OpenEventSpace = null, code : ()=>void = null) : Wait {
val lock = new ConcurrentSkipListSet(identifiers)
onAgentKilled(^space) [
System.out.println("killed: " + it.source.UUID)
lock.remove(it.source.UUID)
]
val w = new CollectionWait(lock, this.directFailureCause)
Expand Down

0 comments on commit 0b2f660

Please sign in to comment.