~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/barriers.rst

  • Committer: Lee Bieber
  • Date: 2011-02-16 23:33:54 UTC
  • mfrom: (1994.4.76 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2174.
  • Revision ID: kalebral@gmail.com-20110216233354-qc8rcc4uoq4h0uqr
Merge Marisa - 716062 - fix ubuntu install doc

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
SELECT signal();
13
13
 
14
 
A barrier is a synchronization objest which can be used to syncronize a
15
 
group of sessions to a specific rendezvous by calling wait(). When wait() is called,
16
 
any session of the user may call signal(), allowing all sessions being held by wait() to proceed. 
 
14
A barrier is a synchronization object which can be used to synchronize a group of sessions to a specific rendezvous by calling wait(). When wait() is called, any session of the user may call signal(), allowing all sessions being held by wait() to proceed.
17
15
 
18
16
Barriers can optionally be created with a limit so that once a set number of sessions have called wait() that all "waiters" are then allowed to proceed. 
19
17
 
20
 
The session that creates the barrier via create_barrier() is not allowed to
21
 
call either wait() or wait_until().
 
18
The session that creates the barrier via create_barrier() is not allowed to call either wait() or wait_until().
22
19
 
23
20
The scope of barriers is to the given username.
24
21
 
25
 
Beyond waiters, you can also create observers by using the wait_until()
26
 
function. Observers are released not only when signal() or release_barrier()
27
 
is called, but also when their definitine predicate happens. You can use
28
 
wait_until() to have a session wait for a certain number of waiters to
29
 
occur, and then do some body of work before the waiters() are signalled to
30
 
continue.
31
 
 
32
 
All waiters and observers are released if release_barrier() is called by the
33
 
session which created the barrier. Also, if the session that created the
34
 
barrier disconnects, all waiters and observers are notified.
35
 
 
36
 
Information on all barriers can be found in the DATA_DICTIONARY.USER_BARRIERS
37
 
table;
 
22
Beyond waiters, you can also create observers by using the wait_until() function. Observers are released not only when signal() or release_barrier() is called, but also when their definitive predicate happens. You can use wait_until() to have a session wait for a certain number of waiters to occur, and then do some body of work before the waiters() are signaled to continue.
 
23
 
 
24
All waiters and observers are released if release_barrier() is called by the session which created the barrier. Also, if the session that created the barrier disconnects, all waiters and observers are notified.
 
25
 
 
26
Information on all barriers can be found in the DATA_DICTIONARY.USER_BARRIERS table.
 
27