CppCon 2015: Fedor Pikus PART 1 “Live Lock-Free or Deadlock (Practical Lock-free Programming)"
Video Statistics and Information
Channel: CppCon
Views: 14,109
Rating: undefined out of 5
Keywords: Fedor Pikus, CppCon 2015, Computer Science (Field), Bash Films, Conference Video Recording, Event Video Recording, Video Conferencing, Video Services, Non-blocking Algorithm, Deadlock
Id: lVBvHbJsg5Y
Channel Id: undefined
Length: 38min 46sec (2326 seconds)
Published: Fri Oct 09 2015
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Is Part 2 still underway?
Found this talk rather entertaining and found it pretty easy to follow even though I have little experience in Concurrency.
EDIT 3: My goodness, I was being stupid. I was trying to replicate this in global scope outside main(). I move it into main and everything compiles correctly. Thank you for all of your responses. Apologies for stupid question.
I did struggle to completely understand the deconstruction of the new operator though. Given the code:
I understand the following:
Instantiate a pointer to a Gizmo. Currently ==
nullptrmost likely garbage (Thank you for the correction c0r3ntin)Allocate enough memory for a Gizmo on the heap and store its address in temp:
Construct a Gizmo in the address held by temp;
Assign the temp address to the_gizmo pointer.
Line 3 fails to compile with an unqualified-id error on my machine. The syntax seems correct from googling so I'm not sure what's going on. Any ideas?
EDIT: I forgot to mention it but I have Gizmo defined as as class at the top of the file. Added step 0.
EDIT 2: I inlined the placement-new into the static cast and it worked:
My compiler (clang) just doesn't seem to like it on its own.