Fencible
Properties
2
Properties
2Typedefs
1
Typedefs
1A description of how to protect a method from reentry.
A value of true is transformed using the key as the all value. For example, this:
class Foo extends Base.mixin(Fencible) {
static fenced = {
foo : true
};
Is equivalent to this:
class Foo extends Base.mixin(Fencible) {
static fenced = {
foo : {
all : ['foo']
}
};
Strings are split on spaces to produce the all array. For example, this:
class Foo extends Base.mixin(Fencible) {
static fenced = {
foo : 'foo bar'
};
Is equivalent to this:
class Foo extends Base.mixin(Fencible) {
static fenced = {
foo : {
all : ['foo', 'bar']
}
};
This indicates that foo() cannot be reentered if foo() or bar() are already executing. On entry to foo(),
both foo() and bar() will be fenced (prevented from entering).
| Parameter | Type | Description |
|---|---|---|
all | String | String[] | One or more keys that must all be currently unlocked to allow entry to the fenced method. String values are converted to an array by splitting on spaces. |
any | String | String[] | One or more keys of which at least one must be currently unlocked to allow entry to the fenced method. String values are converted to an array by splitting on spaces. |
lock | String | String[] | One or more keys that will be locked on entry to the fenced method and released
on exit. String values are converted to an array by splitting on spaces. By default, this array includes all keys
in |