weilawei on Nostr: I have thoughts on the STL, but they're related to concurrency, not game dev. ...
I have thoughts on the STL, but they're related to concurrency, not game dev. Frankly, the STL is specced with a single-threaded model of execution in mind, and it makes this explicit by requiring certain behaviors out of containers.
Turns out, this is an issue trying to map that interface onto lock-free implementations, because it assumes mutability--and lock-free structures don't work that way.
I have unordered_map, unordered_set; I'm working on queue & vector.
Published at
2024-06-08 10:00:36Event JSON
{
"id": "10225470debb5d6f63acae8400f1c47f8cc65a86902f783b63873c5ded1439bb",
"pubkey": "b9110ad2843996fec6f805e96ab4e86a3c66333c0fe452d413111c9f9c28a131",
"created_at": 1717840836,
"kind": 1,
"tags": [
[
"p",
"e062fbe72ae69ccb16a631db7dcba2221e17a897b835743d7f1c0ccd7a2ef223"
],
[
"e",
"6c749c99be9e315e92a6879fd3711c5316d5925a9b3a024834a78c01c7228931",
"",
"root"
],
[
"proxy",
"https://mastodon.online/@weilawei/112580417085151760",
"web"
],
[
"proxy",
"https://mastodon.online/users/weilawei/statuses/112580417085151760",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mastodon.online/users/weilawei/statuses/112580417085151760",
"pink.momostr"
]
],
"content": "I have thoughts on the STL, but they're related to concurrency, not game dev. Frankly, the STL is specced with a single-threaded model of execution in mind, and it makes this explicit by requiring certain behaviors out of containers. \n\nTurns out, this is an issue trying to map that interface onto lock-free implementations, because it assumes mutability--and lock-free structures don't work that way. \n\nI have unordered_map, unordered_set; I'm working on queue \u0026 vector.",
"sig": "7d2bf23aa4ed82fddc97f0c57df8e8078ea8303e2308db715d3977cb7b92060afcafd9326627c1ef37963aa85236345059563680fce4368983697fa4fb8f11eb"
}