Cannot call Add/Del while trimming #1

Open
opened 2025-09-11 21:11:45 -06:00 by sashakoshka · 0 comments
Owner

Iterating over the list of actors locks it, but so does using Add/Del. Two ways of fixing this:

  1. get a slice of keys and immediately release the lock, and iterate using that
  2. have add/del push to a queue that is fulfilled in the main goroutine after the trimming process has completed

1 is simpler but has two downsides:

  1. might not scale well?
  2. possibly some concurrency issues
Iterating over the list of actors locks it, but so does using Add/Del. Two ways of fixing this: 1. get a slice of keys and immediately release the lock, and iterate using that 2. have add/del push to a queue that is fulfilled in the main goroutine after the trimming process has completed 1 is simpler but has two downsides: 1. might not scale well? 2. possibly some concurrency issues
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sashakoshka/camfish#1
No description provided.