Chapter 10. Unit too

Table of Contents
10.1. File too/AutoLock
10.2. File too/Connection
10.3. File too/DescriptorDelegate
10.4. File too/DescriptorSet
10.5. File too/PortCoder
10.6. File too/PortDecoder
10.7. File too/PortEncoder
10.8. File too/Proxy
10.9. File too/RunLoop
10.10. File too/Timer
10.11. File too/inet
10.12. File too/network
10.13. File too/ports
10.14. File too/Nameserver

The too unit provides TOM with networking, event dispatching, and distributed objects.

10.1. File too/AutoLock

class tom.Conditions (AutoLock)

This extension provides deadlock-condition.

variables

static ConditionClass deadlock-condition;

instance tom.Conditions (AutoLock)

class tom.Thread (AutoLock)

Necessary glue within Thread class.

instance tom.Thread (AutoLock)

variables

public Thread blockedBy;

The thread which has to release a lock so we can continue.

methods


boolean
  isWaitingFor Thread t;

Return TRUE if we are waiting for the argument Thread t to finish. This includes implied (transitive) waiting.


void
  setBlockedBy Thread t;

Set blockedBy. This is solely used internally by the AutoLock class.

class too.AutoLock

Recursive lock with deadlock detection. If deadlock occurs, the faulty thread will be unjammed by receiving deadlock-condition.

inherits

State supers: RecursiveLock, Conditions

methods


void
  load MutableArray arguments;

Initialization method.

instance too.AutoLock

variables

Thread owner;

The thread holding the lock, nil if none.

methods


id
  init;

Designated initializer.


void
  lock;

Obtain the lock, but if a deadlock is detected, deadlock-condition will be raised.


void
  unlock;

Unlock the lock.