Module: Transaction::Simple::ThreadSafe

### Home Classes Methods

### In Files

- lib/transaction/simple/threadsafe.rb

### Namespace

- CLASS Transaction::Simple::ThreadSafe::Group

### Included Modules

- Transaction::Simple

### Files

- History.rdoc
- Manifest.txt
- README.rdoc

### Class/Module Index

Quicksearch

- Transaction
- Transaction::Simple
- Transaction::Simple::Group
- Transaction::Simple::ThreadSafe
- Transaction::Simple::ThreadSafe::Group
- Transaction::TransactionAborted
- Transaction::TransactionCommitted
- Transaction::TransactionError
- Transaction::TransactionThreadError

No matching classes.

# Transaction::Simple::ThreadSafe

Thread-safe simple object transaction support for Ruby. Transaction::Simple::ThreadSafe is used in the same way as Transaction::Simple. Transaction::Simple::ThreadSafe uses a Mutex object to ensure atomicity at the cost of performance in threaded applications.

Transaction::Simple::ThreadSafe will not wait to obtain a lock; if the lock cannot be obtained immediately, a Transaction::TransactionThreadError will be raised.

Thanks to Mauricio Fernandez for help with getting this part working.

Threadsafe transactions can be used in any place that normal transactions would. The main difference would be in setup:

    require 'transaction/simple/threadsafe'

    x = "Hello, you."
    x.extend(Transaction::Simple::ThreadSafe) # Threadsafe

    y = "Hello, you."
    y.extend(Transaction::Simple)             # Not threadsafe

### Constants

SKIP_TRANSACTION_VARS

[Validate]

Generated with the Darkfish Rdoc Generator 2.