Use ConcurrentBag<T> instead of volatile List<T> #14

Open
opened 2023-01-23 18:02:54 +01:00 by zotan · 1 comment
Owner

e.g. in

Lines 40 to 41 in 65d8141
public static volatile List<string> messageQueue = new();
public static volatile List<string> missedMessages = new();

e.g. in https://git.ztn.sh/zotan/tgcli/src/commit/65d8141d1827b17b7cb82613b7bca81f24c384ea/tgcli/tgcli.cs#L40-L41
Author
Owner

Hmmm, volatile might still be required, and the locks as well. Seems to be more pain than it's worth.

Hmmm, volatile might still be required, and the locks as well. Seems to be more pain than it's worth.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: zotan/tgcli#14
No description provided.