Bas A.Schulte writes:
> still is something I haven't figured out. Basically, I need some way to 
> coordinate the children so each child can find out what the other 
> children are doing.

Use a table in your database.  The DB needs to support row level
locking (we use Oracle).   Here's an example:

    insert into resource_lock_t (instance_count) values (1)

Don't commit yet.  Rather, right before committing, delete the row:

    delete from resource_lock_t where instance_count = 1

Anybody waiting for instance_count #1 will block until the delete
happens.  You only allow up to four inserts (instance_count is the
primary key).

Rob


Reply via email to