Implemented rotations

This commit is contained in:
Lorenzo Torres 2025-08-06 16:35:29 +02:00
parent 7a634d53b5
commit defdf051ec
6 changed files with 29 additions and 13 deletions

View file

@ -26,7 +26,7 @@ pub const Human = struct {
// TODO(ernesto): Move pool to its own file
pub const Pool = struct {
humans: std.MultiArrayList(Human),
resources: Resources,
resources: *Resources,
allocator: Allocator,
system_groups: std.ArrayList(SystemGroup),
sync_groups: std.ArrayList(SyncGroup),
@ -34,7 +34,7 @@ pub const Pool = struct {
wait_group: std.Thread.WaitGroup,
mutex: std.Thread.Mutex,
pub fn init(allocator: Allocator, resources: Resources) !@This() {
pub fn init(allocator: Allocator, resources: *Resources) !@This() {
var pool = @This(){
.humans = .{},
.resources = resources,