|
|
|
|
|
by gpderetta
3657 days ago
|
|
Under the proposed C++ TM, synchronised blocks can do i/o. They are not transactional, but do compose. If you have two locked data structures and you want an operation to manipulate both atomically you need to expose the locks. And if you want the operation itself to compose with others... well get hairy. TM is widely used I believe by least Haskel and Closure programmers, even with non hardware accelerated versions because of the ease of use. HTM is another story, it's availability is still relatively restricted. Time will tell. |
|
I think you are confused about the meaning of composability. The synchronized/atomic TM proposal for C++ is roughly single-global-lock. This means that you can still deadlock if you use synchronized to protect IPC with another process, which then does an IPC call back to you, which you service on another thread that also uses synchronized. Whenever these transactional proposals fall back on locking, they immediately bring in the pitfalls of locking.
The C++ TM proposal is a joke. There's no good reason to use concurrency if you won't get a speed-up, and the current design of synchronized is sure to make it more difficult to get speed-ups.