Hi Tom,
You could use the LOCK/UNLOCK Basic statements. These are designed for
interprocess control, but I dont know if they will achieve your goal of
not wasting resources.
So in each program you would have something like this:
LOOP UNTIL LOCK n DO
RQM
REPEAT
process stuff here
UNLOCK n
where n is a number between 0 and 63.
The problem with this is that the process has to check on the lock, sleep,
wake up, check on the lock etc. It doesn't just stay blocked until the
lock is available.
The alternative would be to us a READU on a file that is already opened by
the program. I don't know which method would be the least resource
intensive - it would be interesting to experiment and find out.....
cheers,
asvin
[email protected] wrote on 26/02/2009 12:57:14:
> Tom Whitmore <[email protected]>
> Sent by: [email protected]
>
> Feb 26 2009 13:23
>
> Mail Size: 4681
>
> Please respond to
> [email protected]
>
> To
>
> "[email protected]" <[email protected]>
>
> cc
>
> Subject
>
> [U2] Inter-Process Control...
>
> Entity
>
> <Computed Value>
>
> We have two phantom processes. The first phantom needs to wait for an
event
> to occur with the second phantom. I realize that I could have the first
> phantom loop, check, then sleep. However, I'd like to avoid wasting
> resources. Back on the Prime, I could use semaphores, to control this
flow
> and this was clean, and simple. Has anyone come across a means of
having a
> phantom wait on "something", so it only wakes up when it needs to
perform its
> function?
>
> To try to explain better:
>
> Phantom1:
> Loop
> Wait on semaphore
> Perform a shared process (batch updates would be an example)
> Repeat
>
>
> Phantom2 (3, 4, ...):
> Loop
> Process records
> Notify semaphore
> Repeat
>
> Thanks,
> Tom Whitmore
> RATEX Business Solutions
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
************************************************************
HSBC Bank plc may be solicited in the course of its placement efforts for
a new issue, by investment clients of the firm for whom the Bank as a firm
already provides other services. It may equally decide to allocate to its
own proprietary book or with an associate of HSBC Group. This represents a
potential conflict of interest. HSBC Bank plc has internal arrangements
designed to ensure that the firm would give unbiased and full advice to
the corporate finance client about the valuation and pricing of the
offering as well as internal systems, controls and procedures to identify
and manage conflicts of interest.
HSBC Bank plc
Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom
Registered in England - Number 14259
Authorised and regulated by the Financial Services Authority.
************************************************************
-----------------------------------------
SAVE PAPER - THINK BEFORE YOU PRINT!
This transmission has been issued by a member of the HSBC Group
"HSBC" for the information of the addressee only and should not be
reproduced and/or distributed to any other person. Each page
attached hereto must be read in conjunction with any disclaimer
which forms part of it. Unless otherwise stated, this transmission
is neither an offer nor the solicitation of an offer to sell or
purchase any investment. Its contents are based on information
obtained from sources believed to be reliable but HSBC makes no
representation and accepts no responsibility or liability as to its
completeness or accuracy.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/