G
Guest
// What I want to do
Use enumerated types with the Interlocked.Exchange methods
Suggestions please
// My estimation of problem
Seems like Interlocked.Exchange only works with ints, referencable objects,
and floats
// Background
I have a class that wraps up a worker thread to handle various requests
The thread function is implemeted as a looped switch based state machine
The state machine states are enumerated (via an enum)
Requests are made by the client through various methods exposed by the class
Requests are embodied using the enumeration described above
The requested enum state variable gets filed away via interlocked exchange
for later retrieval by worker thread..
// Confessions
works fine with C++ and CRTL. I'm a C# newbie
cheers
Use enumerated types with the Interlocked.Exchange methods
Suggestions please
// My estimation of problem
Seems like Interlocked.Exchange only works with ints, referencable objects,
and floats
// Background
I have a class that wraps up a worker thread to handle various requests
The thread function is implemeted as a looped switch based state machine
The state machine states are enumerated (via an enum)
Requests are made by the client through various methods exposed by the class
Requests are embodied using the enumeration described above
The requested enum state variable gets filed away via interlocked exchange
for later retrieval by worker thread..
// Confessions
works fine with C++ and CRTL. I'm a C# newbie
cheers