#Idiomatic constructor name when pointer provided by caller?
1 messages · Page 1 of 1 (latest)
I would still call that function init
But if you don't like that, maybe setup or something?
Generally I'd try and avoid that type of constructor though; the only usecase is pinned datastructures which are often not a great idea
In this case its necessary since the struct contains a MPSC queue that is used by many threads, so the queue must be stable.
Its an event loop
Fair enough, that's one of the few cases where it's justified :)