Closed
Description
Proposed mechanism for this: @atomic
decorator
Given the following class example:
class A {
@atomic b: i32 = 0;
}
// should be the equivalent of writing the following code
class A {
private _b: i32 = 0;
public get b(): i32 {
return atomic.load<i32>(changetype<usize>(this), offsetof<A>("_b"));
}
public set b(value: i32) {
return atomic.store<i32>(changetype<usize>(this), value, offsetof<A>("_b"));
}
}