interlocked
locking mechanism that provides information about the state in .NET 3.5
I\'m trying to find a way to provide exclusive access to a resource, while at the same time providing information about the state of the lock (_isWorking) for other classes to read.[详细]
2023-01-04 19:12 分类:问答Detect if touch device
I\'m writing a MIDlet using the Kuix UI toolkit, and I want to make changes to the toolkit depending on whether the current device is a touch screen device. (These changes include making buttons bigge[详细]
2022-12-24 00:31 分类:问答Does Interlocked guarantee visibility to other threads in C# or do I still have to use volatile?
I\'ve been reading the answer to a similar question, but I\'m still a little confused... Abel had a great answer, but this is the part that I\'m unsure about:[详细]
2022-12-23 04:52 分类:问答Why does Interlocked.CompareExchange<T> only support reference types?
Disclaimer: My posts are apparently always verbose. If you happen to know the answer to the title question, feel free to just answer it without reading my extended discussion below.[详细]
2022-12-20 07:02 分类:问答Using Interlocked
Is this code thread-safe? or put it this way: Is there anyway to call GetIt() and that GetIt() will return the same number to 2 different threads[详细]
2022-12-19 11:53 分类:问答Does Interlocked.CompareExchange(double,double,double) work in 32 bit OS?
I\'m maintaining a high performance class that can be operated on by multiple threads.Many of 开发者_如何学Pythonthe fields are volatile ints, and as it turns out I need to upgrade one of those to a d[详细]
2022-12-14 19:12 分类:问答Lockless Deque in Win32 C++
I\'m pretty new to lockless data structures, so for an exercise I wrote (What I hope functions as) a bounded lockless deque (No resizing yet, just want to get the base cases working). I\'d just like t[详细]
2022-12-13 14:00 分类:问答Threading and un-safe variables
I have code listed here: Threading and Sockets. The answer to that question was to modify isListening with volatile. As I remarked, that modifier allowed me to access the variable from another thread[详细]
2022-12-11 15:03 分类:问答Is there any advantage of using volatile keyword in contrast to use the Interlocked class?
In other words, can I do something with a volatile variable that could not also be solved with a normal variable an开发者_如何学Cd the Interlocked class?EDIT: question largely rewritten[详细]
2022-12-10 18:11 分类:问答
加载中,请稍侯......