Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
b3b340657y@soolkiki Is it a lock guard? I heard of semaphores in the Vulkan API. As I said I cannot restrict the access to my var since my thread 1 needs to access it the whole time. If it cannot access it it won't work as it should. I'll try it though
-
@b3b3 more of a mechanism in which allows threads to share information. Think of how operating systems multitask. Semaphores are what allow them to do what they do.
I think I understood you wanted to share the variable between threads, well, semaphores would allow you to either lock or unlock that variable based on conditions you define. -
@linuxer4fun
Before I learned how to share info between threads using queues, this is what I did.
It resulted in some horror stories. -
@soolkiki youre saved now... A few weeks ago, i wanted to multithread a C programm. Queues dont really exist for it (atleast i didnt find anything like that) i cried in the evening (no shit, sherlock)
-
@linuxer4fun oh geez...yeah, I'm not aware of any in c, but I imagine you'd be building your own queue.
I feel bad for you!
Related Rants
-
xjose97x19Just saw a variable in C named like this: long time_ago; //in a galaxy far away I laughed no stop.
-
Unskipp24So this happened last night... Gf: my favorite bra is not fitting me anymore Me: get a new one ? Gf: but it ...
-
sam966911Hats off to this lady .... I would have just flipped the machine
I'm writing a multi threaded program right now and just pray for the threads not accessing my var at the same time :) but I cannot use a locking algo because my 1st thread needs to access that var up to 1000 times a second. Pray for it to work as it should 🤔😇
undefined
i love jesus
c++
god is good
fuck me