Aside from your professional content, people are aware of your awesome English pronunciations. Your voices and tones are very good. 👍🏻
@saulth3 жыл бұрын
Great, I made something just like this a few years back and it's been very nice to use, takes away many opportunities to fail. I like your implementations better, thanks 😁
@jonkalb27463 жыл бұрын
What a great library. Tell me again why it isn’t in Boost?
@CopperSpice3 жыл бұрын
Glad to help you make this happen.
@267praveen2 жыл бұрын
@@CopperSpice you didn't answer his question
@CopperSpice2 жыл бұрын
@@267praveen, his comment was actually an inside joke. Jon offered to submit this to Boost a few years ago and has yet to make it happen. We are happy to support anyone who would like to pursue this endeavor.
@KayFiiya3 жыл бұрын
Please share videos about how to use CopperSpice to build guis in c++
@skarndev4883 жыл бұрын
Awesome simplification for the use of threading! Does CsLibGuarded allow sharing a singular internal mutex for multiple objects to avoid lock overhead?
@CopperSpice3 жыл бұрын
I believe what you are asking is how to "guard" multiple pieces of data using the same mutex. The best approach to solve this is to place your data objects in a single structure. Then using the struct as the data type for the guarded variable. This is a really cool use case.
@NoNameAtAll23 жыл бұрын
Why doesn't such a respectable channel use universal initialisation at slide at 4:10?
@CopperSpice3 жыл бұрын
As a correction, there is nothing in the standard called "universal initialization." This is a common misconception. There are several different forms of initialization which use braces, such as direct initialization, default initialization, zero initialization, and aggregate initialization. Some of these have interesting corner cases. We write our examples to highlight the current topic rather than teaching multiple things at once.
@VishalSharma-ys9wt3 жыл бұрын
I felt like "data race" would've been the more appropriate term instead of "race condition" at some places in the video.
@kormisha2 жыл бұрын
In lr_gurded class, updating write value does not need to block the readers but would not updating the read value have to block the readers?
@CopperSpice2 жыл бұрын
In the lr_guarded class the two values are called "left" and "right". Can you tell me what you are referring to by the "write" and the "read" value?
@kormisha2 жыл бұрын
@@CopperSpice as per the video, the write value is the one that gets updated with the mutex. The read value is the one consumed by the threads and the video says no mutex is needed as only read operations are performed. But I do not understand how you keep both values in sync without locking both at some time.
@CopperSpice2 жыл бұрын
Thanks, now we understand your question. Let me give you an example of how the lr_guarded algorithm works. If the left value is currently being read then the right value can be updated by the writer. After the right value is updated, internal pointers are updated so new readers start reading the right value. After all old readers have completed, the left value is then updated to match the right value and this can be done without a lock. This writer may have to wait a long time for all old readers to finish. If you have other comments or questions please feel free to ask. This discussion added a lot to the video.
@wizardy62673 жыл бұрын
Another nice video
@CopperSpice3 жыл бұрын
Glad you liked the video.
@NoNameAtAll23 жыл бұрын
This lib reminds me of rust's "mutex" type, but slightly better. Glad it came to c++
@CopperSpice3 жыл бұрын
The initial release for CsLibGuarded was about 5 years ago. We have other videos which talk about the internals, this was our first "how to use" it.
@manuelm.83643 жыл бұрын
The Github link doesn't work. But the video is very interesting.
@CopperSpice3 жыл бұрын
Here is the exact link to the source code for CsLibGuarded. github.com/copperspice/cs_libguarded
@manuelm.83643 жыл бұрын
@@CopperSpice Yes, I found it. I thought you may want to fix the link. There is a HTML 404 error.
@CopperSpice3 жыл бұрын
@@manuelm.8364 Oh, your comment was referring to a bug in the youtube link. Seems they damaged the url we supplied. We will get this fixed.