mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
14 lines
252 B
Plaintext
14 lines
252 B
Plaintext
import java.util.Collections;
|
|
java.util.List alist = Collections.synchronizedList(new ArrayList());
|
|
|
|
void setup() {
|
|
size(400, 200);
|
|
alist.add("hello");
|
|
}
|
|
|
|
void draw() {
|
|
rect(width/4, height/4, width/2, height/2);
|
|
synchronized(alist) {
|
|
alist.get(0);
|
|
}
|
|
} |